]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/DatePickerCtrl.py
fix compilation problem when wxUSE_FSVOLUME==0 after last commit: declare wxIsDriveAv...
[wxWidgets.git] / wxPython / demo / DatePickerCtrl.py
CommitLineData
b3b61cda
RD
1
2import wx
3
4#----------------------------------------------------------------------
5
6class 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
22def runTest(frame, nb, log):
23 win = TestPanel(nb, log)
24 return win
25
26#----------------------------------------------------------------------
27
28
29
30overview = """<html><body>
31<h2><center>wx.DatePickerCtrl</center></h2>
32
33This control allows the user to select a date. Unlike
34wx.calendar.CalendarCtrl, which is a relatively big control,
35wx.DatePickerCtrl is implemented as a small window showing the
36currently selected date. The control can be edited using the keyboard,
37and can also display a popup window for more user-friendly date
38selection, depending on the styles used and the platform.
39
40</body></html>
41"""
42
43
44
45if __name__ == '__main__':
46 import sys,os
47 import run
48 run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
49