]> git.saurik.com Git - wxWidgets.git/commitdiff
use wxDP_SPIN by default under Win32
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 19 Jan 2005 19:39:33 +0000 (19:39 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 19 Jan 2005 19:39:33 +0000 (19:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/datectrl.tex
src/msw/datectrl.cpp

index 73f6482eabc6a11f0b347c871eb7b73754926c55..cda0fa313846ba9bea3918ef1837e4988f5b486a 100644 (file)
@@ -40,7 +40,8 @@ components. This style is not supported by the generic version.}
 \twocolitem{\windowstyle{wxDP\_DROPDOWN}}{Creates a control with a month
 calendar drop down part from which the user can select a date.}
 \twocolitem{\windowstyle{wxDP\_DEFAULT}}{Creates a control with default style
-which is the best supported for the current platform.}
+which is the best supported for the current platform (currently wxDP\_SPIN
+under Windows and wxDP\_DROPDOWN elsewhere).}
 \end{twocollist}
 
 \wxheading{Event handling}
index 5d1ffa61ac0cc237bd46fe7760e194462a05ce27..012de2fe24f754a13b188aa25f1298d0e3e7883e 100644 (file)
@@ -82,6 +82,10 @@ wxDatePickerCtrl::Create(wxWindow *parent,
                          const wxValidator& validator,
                          const wxString& name)
 {
+    // use wxDP_SPIN if wxDP_DEFAULT (0) was given as style
+    if ( !(style & wxDP_DROPDOWN) )
+        style |= wxDP_SPIN;
+
     // initialize the base class
     if ( !CreateControl(parent, id, pos, size, style, validator, name) )
         return false;