DatePicker questions

Debian sid
wx 2.8.12.1-3

···

=========
Hi list,

I've a simple DP, as:

self.datePicker = wx.DatePickerCtrl( self.panel, wx.ID_ANY,
  wx.DefaultDateTime, wx.DefaultPosition, wx.Size( 140,-1 ),
  wx.DP_DEFAULT|wx.DP_SHOWCENTURY | wx.DP_SPIN )

Q1: wx.DP_SPIN don't change anything to the visual, why?

Q2: I set: self.datePicker.Bind( wx.EVT_DATE_CHANGED,
    self.datePickerOnDateChanged )
    but I remarked that any change triggers datePickerOnDateChanged,
    even erasing a number from the date (calendar not deployed), so
    is there another event I could use to wait for the definitive
    date change, or shall I add a button for that?

JY
--
There's no such thing as a free lunch.
    -- Milton Friendman

Debian sid
wx 2.8.12.1-3

Hi list,

I've a simple DP, as:

self.datePicker = wx.DatePickerCtrl( self.panel, wx.ID_ANY,
  wx.DefaultDateTime, wx.DefaultPosition, wx.Size( 140,-1 ),
  wx.DP_DEFAULT|wx.DP_SHOWCENTURY | wx.DP_SPIN )

Q1: wx.DP_SPIN don't change anything to the visual, why?

The docs (at least for 2.9) state that it is not supported by the generic date picker, and I think that the generic date picker is used by default on all platforms except wxMSW.

Q2: I set: self.datePicker.Bind( wx.EVT_DATE_CHANGED,
    self.datePickerOnDateChanged )
     but I remarked that any change triggers datePickerOnDateChanged,
     even erasing a number from the date (calendar not deployed), so
     is there another event I could use to wait for the definitive
     date change, or shall I add a button for that?

Probably. Or wait until later to fetch and do something with the date value, such as when focus moves to another control, or when the dialog is closed (if you are using a dialog) or whatever.

···

On 11/29/11 10:30 AM, Jean-Yves F. Barbier wrote:

--
Robin Dunn
Software Craftsman

The docs (at least for 2.9) state that it is not supported by the
generic date picker,

I read that, this is why I switched from wx.GenericDatePickerCtrl
(generated by wxFormBuilder) to wx.DatePickerCtrl.

and I think that the generic date picker is used by
default on all platforms except wxMSW.

Do you mean the 2 widgets the same under Linux??

...

Probably. Or wait until later to fetch and do something with the date
value, such as when focus moves to another control, or when the dialog
is closed (if you are using a dialog) or whatever.

Ok, I'll add a button.

···

On Tue, 29 Nov 2011 11:45:37 -0800 Robin Dunn <robin@alldunn.com> wrote:

--
Take me drunk, I'm home again!

Yes.

···

On 11/29/11 12:04 PM, Jean-Yves F. Barbier wrote:

On Tue, 29 Nov 2011 11:45:37 -0800 > Robin Dunn<robin@alldunn.com> wrote:

The docs (at least for 2.9) state that it is not supported by the
generic date picker,

I read that, this is why I switched from wx.GenericDatePickerCtrl
(generated by wxFormBuilder) to wx.DatePickerCtrl.

  and I think that the generic date picker is used by
default on all platforms except wxMSW.

Do you mean the 2 widgets the same under Linux??

--
Robin Dunn
Software Craftsman