]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/demo/wxCalendarCtrl.py
wxMGL update
[wxWidgets.git] / wxPython / demo / wxCalendarCtrl.py
... / ...
CommitLineData
1
2from wxPython.wx import *
3from wxPython.calendar import *
4from wxPython.utils import *
5
6#----------------------------------------------------------------------
7
8class TestPanel(wxPanel):
9 def __init__(self, parent, ID, log):
10 wxPanel.__init__(self, parent, ID)
11 self.log = log
12
13 cal = wxCalendarCtrl(self, 101, wxDateTime_Now(), pos = (25,50),
14 style = wxCAL_SHOW_HOLIDAYS | wxCAL_SUNDAY_FIRST)
15
16 EVT_CALENDAR(self, 101, self.OnCalSelected)
17
18
19 def OnCalSelected(self, evt):
20 self.log.write('OnCalSelected: %s\n' % evt.GetDate())
21
22
23#----------------------------------------------------------------------
24
25def runTest(frame, nb, log):
26 win = TestPanel(nb, -1, log)
27 return win
28
29#----------------------------------------------------------------------
30
31
32overview = """\
33<html><body>
34<h2>wxCalendarCtrl</h2>
35
36Yet <i>another</i> calendar control. This one is a wrapper around the C++
37version described in the docs. This one will probably be a bit more efficient
38than the one in wxPython.lib.calendar, but I like a few things about it better,
39so I think both will stay in wxPython.
40"""