]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/DatePickerCtrl.py
4 #----------------------------------------------------------------------
6 class TestPanel(wx
.Panel
):
7 def __init__(self
, parent
, log
):
9 wx
.Panel
.__init
__(self
, parent
, -1)
11 dpc
= wx
.DatePickerCtrl(self
, size
=(120,-1),
12 style
=wx
.DP_DROPDOWN | wx
.DP_SHOWCENTURY
)
14 sizer
= wx
.BoxSizer(wx
.VERTICAL
)
15 sizer
.Add(dpc
, 0, wx
.ALL
, 50)
20 #----------------------------------------------------------------------
22 def runTest(frame
, nb
, log
):
23 win
= TestPanel(nb
, log
)
26 #----------------------------------------------------------------------
30 overview
= """<html><body>
31 <h2><center>wx.DatePickerCtrl</center></h2>
33 This control allows the user to select a date. Unlike
34 wx.calendar.CalendarCtrl, which is a relatively big control,
35 wx.DatePickerCtrl is implemented as a small window showing the
36 currently selected date. The control can be edited using the keyboard,
37 and can also display a popup window for more user-friendly date
38 selection, depending on the styles used and the platform.
45 if __name__
== '__main__':
48 run
.main(['', os
.path
.basename(sys
.argv
[0])] + sys
.argv
[1:])