Home | Trees | Index | Help |
|
---|
Package wx :: Class DatePickerCtrl |
|
object
--+ |Object
--+ |EvtHandler
--+ |Window
--+ |Control
--+ | DatePickerCtrl
This control allows the user to select a date. Unlike
wx.calendar.CalendarCtrl
, which is a relatively big control,
wx.DatePickerCtrl
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.
wx.DP_SPIN Creates a control without month calendar drop down but with spin control-like arrows to change individual date components. This style is not supported by the generic version. wx.DP_DROPDOWN Creates a control with a month calendar drop down part from which the user can select a date. wx.DP_DEFAULT Creates a control with default style which is the best supported for the current platform (currently wx.DP_SPIN under Windows and wx.DP_DROPDOWN elsewhere). wx.DP_ALLOWNONE With this style, the control allows the user to not enter any valid date at all. Without it -- which is by default -- the control always has some valid date. wx.DP_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.
EVT_DATE_CHANGED This event fires when the user changes the current selection in the control.
See Also: wx.calendar.CalendarCtrl
, wx.DateEvent
Method Summary | |
---|---|
DatePickerCtrl |
Create a new DatePickerCtrl. |
__repr__(self)
| |
bool |
Create the GUI parts of the DatePickerCtrl, for use in 2-phase creation. |
DateTime |
Get the lower limit of the valid range for the date selection, if any. |
DateTime |
Get the upper limit of the valid range for the date selection, if any. |
DateTime |
Returns the currently selected date. |
Sets the valid range for the date selection. | |
Changes the current value of the control. |
Instance Method Details |
---|
__init__(self,
parent,
id=-1,
dt=wxDefaultDateTime,
pos=DefaultPosition,
size=DefaultSize,
style=wxDP_DEFAULT|wxDP_SHOWCENTURY,
validator=DefaultValidator,
name=DatePickerCtrlNameStr)
Create a new DatePickerCtrl. |
Create(self, parent, id=-1, dt=wxDefaultDateTime, pos=DefaultPosition, size=DefaultSize, style=wxDP_DEFAULT|wxDP_SHOWCENTURY, validator=DefaultValidator, name=DatePickerCtrlNameStr)Create the GUI parts of the DatePickerCtrl, for use in 2-phase creation.
|
GetLowerLimit(self)Get the lower limit of the valid range for the date selection, if any. If there is no range or there is no lower limit, then thewx.DateTime value returned will be invalid.
|
GetUpperLimit(self)Get the upper limit of the valid range for the date selection, if any. If there is no range or there is no upper limit, then thewx.DateTime value returned will be invalid.
|
GetValue(self)Returns the currently selected date. If there is no selection or the selection is outside of the current range, an invalidwx.DateTime
object is returned.
|
SetRange(self, dt1, dt2)Sets the valid range for the date selection. If dt1 is valid, it becomes the earliest date (inclusive) accepted by the control. If dt2 is valid, it becomes the latest possible date. If the current value of the control is outside of the newly set range bounds, the behaviour is undefined.
|
SetValue(self, dt)Changes the current value of the control. The date should be valid and included in the currently selected range, if any. Calling this method does not result in a date change event.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1.20040428.rpd on Tue Apr 26 14:24:35 2005 | http://epydoc.sf.net |