X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/299647acac7960652aadb008775429c1f8ea9b8d..d0ee33f5c6908b4ac5e1364381f0ef00942e3936:/wxPython/demo/Calendar.py diff --git a/wxPython/demo/Calendar.py b/wxPython/demo/Calendar.py index d9134beb5d..44cfdca5b0 100644 --- a/wxPython/demo/Calendar.py +++ b/wxPython/demo/Calendar.py @@ -1,5 +1,5 @@ #---------------------------------------------------------------------------- -# Name: wxCalendar.py +# Name: Calendar.py # Purpose: Calendar control display testing on panel for wxPython demo # # Author: Lorne White (email: lwhite1@planet.eon.net) @@ -11,14 +11,9 @@ # 11/15/2003 - Jeff Grimmett (grimmtooth@softhome.net) # # o Updated for wx namespace -# o Some updating of the library itself will be needed for this demo to work -# correctly. # # 11/26/2003 - Jeff Grimmett (grimmtooth@softhome.net) # -# o Problems have changed a little. The print dialog requires -# a wx.Size to work with the calendar library. wx.core doesn't -# approve, though, so we get deprecation warnings. # o Ugh. AFter updating to the Bind() method, things lock up # on various control clicks. Will have to debug. Only seems # to happen on windows with calendar controls, though. @@ -28,16 +23,6 @@ # o Lockup issue clarification: it appears that the spinner is # the culprit. # -# 12/01/2003 - Jeff Grimmett (grimmtooth@softhome.net) -# -# o New Bind() method now fully supported. -# -# 12/17/2003 - Jeff Grimmett (grimmtooth@softhome.net) -# -# o wxCalendar renamed to Calendar -# o Got rid of unneeded IDs where Bind() could figure it -# out for itself. -# import os @@ -137,23 +122,14 @@ class TestPanel(wx.Panel): self.Bind(wx.EVT_SPIN, self.OnSpin, self.spin) # button for calendar dialog test - - wx.StaticText(self, -1, "Test Calendar Dialog", (350, 50), (150, -1)) - - bmp = images.getCalendarBitmap() - self.but1 = wx.BitmapButton(self, -1, bmp, (380, 80)) + self.but1 = wx.Button(self, -1, "Test Calendar Dialog", (380, 80)) self.Bind(wx.EVT_BUTTON, self.TestDlg, self.but1) # button for calendar window test - - wx.StaticText(self, -1, "Test Calendar Window", (350, 150), (150, -1)) - - self.but2 = wx.BitmapButton(self, -1, bmp, (380, 180)) + self.but2 = wx.Button(self, -1, "Test Calendar Window", (380, 180)) self.Bind(wx.EVT_BUTTON, self.TestFrame, self.but2) - wx.StaticText(self, -1, "Test Calendar Print", (350, 250), (150, -1)) - - self.but3 = wx.BitmapButton(self, -1, bmp, (380, 280)) + self.but3 = wx.Button(self, -1, "Test Calendar Print", (380, 280)) self.Bind(wx.EVT_BUTTON, self.OnPreview, self.but3) # calendar dialog @@ -394,7 +370,7 @@ class PrintCalend: self.font = wx.SWISS self.bold = wx.NORMAL - self.sel_key = None # last used by + self.sel_key = None # last used by self.sel_lst = [] # highlighted selected days self.size = None @@ -680,5 +656,5 @@ by Lorne White if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])