[wx-dev] #9561: DatePickerCtrl not referencing set date under Linux
wxTrac
noreply at wxsite.net
Tue Jun 10 15:50:48 PDT 2008
Ticket URL: <http://trac.wxwidgets.org/ticket/9561>
#9561: DatePickerCtrl not referencing set date under Linux
-------------------------------------+--------------------------------------
Reporter: wxpython at hellokitty.com | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxGTK | Version: 2.8.7.1
Keywords: wxDatePickerCtrl | Blockedby:
Patch: 0 | Blocking:
-------------------------------------+--------------------------------------
Under Linux (specifically, this was found under Ubuntu 8.04 using Python
2.5.2 and wx 2.8.7.1 (gtk2-unicode)), when you have a DatePickerCtrl and
programmatically set the date to a value, the correct date displays in the
control's text field. But when you invoke the drop-down to adjust the
date, the sub-parts of the control (month, year, day grid) indicate the
current date rather than the date set in the control.
This Python code demonstrates:
# Start code
import wx
app = wx.PySimpleApp()
frame = wx.Frame(None, title='wxDatePickerCtrl issue')
s = wx.BoxSizer(wx.VERTICAL)
frame.SetSizer(s)
dpc = wx.DatePickerCtrl(frame, style=wx.DP_ALLOWNONE | wx.DP_SHOWCENTURY |
wx.DP_DROPDOWN)
s.Add(dpc)
dt = wx.DateTimeFromDMY(3, 1, 1959)
dpc.SetValue(dt)
frame.Show()
app.MainLoop()
# End code
Run that and the control will be set to February 3, 1959. But that's not
the selected date in the controls when you click to get the drop-down.
I have confirmed that in Windows XP, this control performs correctly.
--
Ticket URL: <http://trac.wxwidgets.org/ticket/9561>
More information about the wx-dev
mailing list