\twocolitem{\windowstyle{wxDP\_DEFAULT}}{Creates a control with default style
which is the best supported for the current platform (currently wxDP\_SPIN
under Windows and wxDP\_DROPDOWN elsewhere).}
+\twocolitem{\windowstyle{wxDP\_SHOWCENTURY}}{Forces display of the century in
+the default date format. Without this flas the century could be displayed or
+not depending on the default date representation in the system.}
\end{twocollist}
\wxheading{Event handling}
\param{const wxDateTime\& }{dt = wxDefaultDateTime},\rtfsp
\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
-\param{long}{ style = wxDP\_DEFAULT},\rtfsp
+\param{long}{ style = wxDP\_DEFAULT | wxDP\_SHOWCENTURY},\rtfsp
\param{const wxValidator\& }{validator = wxDefaultValidator},
\param{const wxString\& }{name = ``datectrl"}}
\param{const wxDateTime\& }{dt = wxDefaultDateTime},\rtfsp
\param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp
\param{const wxSize\& }{size = wxDefaultSize},\rtfsp
-\param{long}{ style = wxDP\_DEFAULT},\rtfsp
+\param{long}{ style = wxDP\_DEFAULT | wxDP\_SHOWCENTURY},\rtfsp
\param{const wxValidator\& }{validator = wxDefaultValidator},
\param{const wxString\& }{name = ``datectrl"}}
wxDP_SPIN = 1,
// a combobox-like date picker (not supported in mac version)
- wxDP_DROPDOWN = 2
+ wxDP_DROPDOWN = 2,
+
+ // always show century in the default date display (otherwise it depends on
+ // the system date format which may include the century or not)
+ wxDP_SHOWCENTURY = 4
};
// ----------------------------------------------------------------------------
const wxDateTime& dt = wxDefaultDateTime,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = wxDP_DEFAULT,
+ long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxDatePickerCtrlNameStr);
*/
const wxDateTime& date = wxDefaultDateTime,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = 0,
+ long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
const wxString& name = wxDatePickerCtrlNameStr);
bool Create(wxWindow *parent,
- wxWindowID id,
- const wxDateTime& date,
- const wxPoint& pos,
- const wxSize& size,
- long style,
- const wxString& name=wxDatePickerCtrlNameStr);
+ wxWindowID id,
+ const wxDateTime& date = wxDefaultDateTime,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
+ const wxString& name = wxDatePickerCtrlNameStr);
// wxDatePickerCtrl methods
void SetValue(const wxDateTime& date);
const wxDateTime& dt = wxDefaultDateTime,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = 0,
+ long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxDatePickerCtrlNameStr)
{
const wxDateTime& dt = wxDefaultDateTime,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = 0,
+ long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxDatePickerCtrlNameStr);
styleMSW |= DTS_UPDOWN;
//else: drop down by default
- styleMSW |= DTS_SHORTDATEFORMAT;
+#ifdef DTS_SHORTDATECENTURYFORMAT
+ if ( style & wxDP_SHOWCENTURY )
+ styleMSW |= DTS_SHORTDATECENTURYFORMAT;
+ else
+#endif // DTS_SHORTDATECENTURYFORMAT
+ styleMSW |= DTS_SHORTDATEFORMAT;
return styleMSW;
}