]> git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/DatePickerCtrl.py
code cleanup in DrawTextRectangle()
[wxWidgets.git] / wxPython / demo / DatePickerCtrl.py
1
2 import wx
3
4 #----------------------------------------------------------------------
5
6 class TestPanel(wx.Panel):
7 def __init__(self, parent, log):
8 self.log = log
9 wx.Panel.__init__(self, parent, -1)
10
11 dpc = wx.DatePickerCtrl(self, size=(120,-1),
12 style=wx.DP_DROPDOWN | wx.DP_SHOWCENTURY)
13
14 sizer = wx.BoxSizer(wx.VERTICAL)
15 sizer.Add(dpc, 0, wx.ALL, 50)
16
17 self.SetSizer(sizer)
18
19
20 #----------------------------------------------------------------------
21
22 def runTest(frame, nb, log):
23 win = TestPanel(nb, log)
24 return win
25
26 #----------------------------------------------------------------------
27
28
29
30 overview = """<html><body>
31 <h2><center>wx.DatePickerCtrl</center></h2>
32
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.
39
40 </body></html>
41 """
42
43
44
45 if __name__ == '__main__':
46 import sys,os
47 import run
48 run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
49