X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/684eee12d8c287cb10bf44fa4b420f461b345d5e..a61c9122413cef45bad87da7e3dc65617bb2adb7:/docs/latex/wx/datectrl.tex?ds=sidebyside diff --git a/docs/latex/wx/datectrl.tex b/docs/latex/wx/datectrl.tex index 52d923a1ec..36742a58e4 100644 --- a/docs/latex/wx/datectrl.tex +++ b/docs/latex/wx/datectrl.tex @@ -5,17 +5,19 @@ %% Created: 2005-01-15 %% RCS-ID: $Id$ %% Copyright: (c) 2005 Vadim Zeitlin -%% License: wxWidgets license +%% License: wxWindows license %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{\class{wxDatePickerCtrl}}\label{wxdatepickerctrl} -This control allows the user to select a date. Unlike +This control allows the user to select a date. Unlike \helpref{wxCalendarCtrl}{wxcalendarctrl}, which is a relatively big control, -it is implemented as a small window showing the currently selected date and -allowing to edit it directly using the keyboard and may also display a popup +wxDatePickerCtrl is implemented as a small window showing the currently selected date. +The control can be edited using the keyboard, and can also display a popup window for more user-friendly date selection, depending on the styles used and -the platform. +the platform, except PalmOS where date is selected using native dialog. + +It is only available if \texttt{wxUSE\_DATEPICKCTRL} is set to $1$. \wxheading{Derived from} @@ -26,10 +28,29 @@ the platform. \wxheading{Include files} - + (only available if \texttt{wxUSE\_DATEPICKCTRL} is set to $1$) +\wxheading{Window styles} + +\twocolwidtha{5cm}% +\begin{twocollist}\itemsep=0pt +\twocolitem{\windowstyle{wxDP\_SPIN}}{Creates a control without a month calendar +drop down but with spin-control-like arrows to change individual date +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 the style +that is best supported for the current platform (currently wxDP\_SPIN +under Windows and wxDP\_DROPDOWN elsewhere).} +\twocolitem{\windowstyle{wxDP\_ALLOWNONE}}{With this style, the control allows +the user to not enter any valid date at all. Without it - the default - the control always has some valid date.} +\twocolitem{\windowstyle{wxDP\_SHOWCENTURY}}{Forces display of the century in +the default date format. Without this style the century could be displayed, or +not, depending on the default date representation in the system.} +\end{twocollist} + \wxheading{Event handling} \twocolwidtha{7cm}% @@ -53,7 +74,7 @@ changes the current selection in the control.} \param{const wxDateTime\& }{dt = wxDefaultDateTime},\rtfsp \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = 0},\rtfsp +\param{long}{ style = wxDP\_DEFAULT | wxDP\_SHOWCENTURY},\rtfsp \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``datectrl"}} @@ -68,7 +89,7 @@ all the parameters. \param{const wxDateTime\& }{dt = wxDefaultDateTime},\rtfsp \param{const wxPoint\& }{pos = wxDefaultPosition},\rtfsp \param{const wxSize\& }{size = wxDefaultSize},\rtfsp -\param{long}{ style = 0},\rtfsp +\param{long}{ style = wxDP\_DEFAULT | wxDP\_SHOWCENTURY},\rtfsp \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``datectrl"}} @@ -106,12 +127,12 @@ special styles for this control in this version.} If the control had been previously limited to a range of dates using \helpref{SetRange()}{wxdatepickerctrlsetrange}, returns the lower and upper bounds of this range. If no range is set (or only one of the bounds is set), -the \arg{dt1} and/or \arg{dt2} are set to be invalid. + \arg{dt1} and/or \arg{dt2} are set to be invalid. \wxheading{Parameters} \docparam{dt1}{Pointer to the object which receives the lower range limit or -becomes invalid if it is not set. May be \texttt{NULLL} if the caller is not +becomes invalid if it is not set. May be \texttt{NULL} if the caller is not interested in lower limit} \docparam{dt2}{Same as above but for the upper limit} @@ -129,6 +150,21 @@ set. Returns the currently selected. If there is no selection or the selection is outside of the current range, an invalid object is returned. +\membersection{wxDatePickerCtrl::SetFormat}\label{wxdatepickerctrlsetformat} + +\func{void}{SetFormat}{\param{const wxChar*}{ format}} + +Please note that this function is only available in the generic version of this +control. The native version always uses the current system locale. + +Sets the display format for the date in the control. See wxDateTime for the +meaning of format strings. + +\wxheading{Remarks} + +If the format parameter is invalid, +the behaviour is undefined. + \membersection{wxDatePickerCtrl::SetRange}\label{wxdatepickerctrlsetrange} @@ -153,4 +189,3 @@ in the currently selected range, if any. Calling this method does not result in a date change event. -