wxDatePicker Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
stefania
Knows some wx things
Knows some wx things
Posts: 26
Joined: Wed Jul 20, 2005 9:08 am

wxDatePicker

Post by stefania » Wed Jul 10, 2013 1:53 pm

Hi!
I need to use wxDatePicker, but in some case I need to set value to 0.
Is there a way to do it?

Thanks

User avatar
doublemax
Moderator
Moderator
Posts: 15174
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxDatePicker

Post by doublemax » Wed Jul 10, 2013 4:02 pm

What about the wxDP_ALLOWNONE style?
http://docs.wxwidgets.org/trunk/classwx ... _ctrl.html
Use the source, Luke!

stefania
Knows some wx things
Knows some wx things
Posts: 26
Joined: Wed Jul 20, 2005 9:08 am

Re: wxDatePicker

Post by stefania » Thu Jul 11, 2013 7:49 am

Thanks very much!

stefania
Knows some wx things
Knows some wx things
Posts: 26
Joined: Wed Jul 20, 2005 9:08 am

Re: wxDatePicker

Post by stefania » Thu Jul 11, 2013 8:52 am

Hi! Another question!

I need to set this value to 0; how can i set checkbox in wxDatePicker to 0?

Thanks

User avatar
doublemax
Moderator
Moderator
Posts: 15174
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxDatePicker

Post by doublemax » Thu Jul 11, 2013 8:59 am

I haven't tried it, but i'd guess:

Code: Select all

SetValue( wxDefaultDateTime );
You can't set the date to 00-00-0000 as that's no valid date.
Use the source, Luke!

stefania
Knows some wx things
Knows some wx things
Posts: 26
Joined: Wed Jul 20, 2005 9:08 am

Re: wxDatePicker

Post by stefania » Thu Jul 11, 2013 9:17 am

Thanks! Now works fine!!!

Post Reply