added wxDP_SPIN/DROPDOWN styles (only Win32 native version implements the former)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -79,6 +79,9 @@ bool wxDatePickerCtrl::Create(wxWindow *parent,
|
||||
long style,
|
||||
const wxString& name)
|
||||
{
|
||||
wxASSERT_MSG( !(style & wxDP_SPIN),
|
||||
_T("wxDP_SPIN style not supported, use wxDP_DEFAULT") );
|
||||
|
||||
wxString txt;
|
||||
if (date.IsValid())
|
||||
txt = date.FormatDate();
|
||||
|
@@ -100,9 +100,11 @@ WXDWORD wxDatePickerCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const
|
||||
{
|
||||
WXDWORD styleMSW = wxDatePickerCtrlBase::MSWGetStyle(style, exstyle);
|
||||
|
||||
// for now this is unconditional, but we should support drop down control
|
||||
// style as well later
|
||||
styleMSW |= DTS_UPDOWN | DTS_SHORTDATEFORMAT;
|
||||
if ( style & wxDP_SPIN )
|
||||
styleMSW |= DTS_UPDOWN;
|
||||
//else: drop down by default
|
||||
|
||||
styleMSW |= DTS_SHORTDATEFORMAT;
|
||||
|
||||
return styleMSW;
|
||||
}
|
||||
@@ -226,3 +228,4 @@ wxDatePickerCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
||||
}
|
||||
|
||||
#endif // wxUSE_DATEPICKCTRL
|
||||
|
||||
|
Reference in New Issue
Block a user