]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix for bug #511057
authorRobin Dunn <robin@alldunn.com>
Fri, 1 Feb 2002 02:48:21 +0000 (02:48 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 1 Feb 2002 02:48:21 +0000 (02:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/wxCalendar.py
wxPython/wxPython/lib/calendar.py

index 962679a35105848c94a152a803c497466a3db849..181e79d85f329107b9f4abd478a06493a75331d2 100644 (file)
@@ -229,7 +229,8 @@ class TestPanel(wxPanel):
 
 class CalendFrame(wxFrame):
     def __init__(self, parent, id, title, log):
-        wxFrame.__init__(self, parent, id, title, wxPyDefaultPosition, wxSize(400, 400))
+        wxFrame.__init__(self, parent, id, title, size=wxSize(400, 400),
+                         style=wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE)
         EVT_CLOSE(self, self.OnCloseWindow)
 
         self.log = log
index d81f52f1c8d9e59cf2464634ecab13803c36a93e..df66d76a9e32f6a9ccead98d238003ed68a89eed 100644 (file)
@@ -455,7 +455,7 @@ class wxCalendar(wxWindow):
         self.set_day = None
 
         EVT_PAINT(self, self.OnPaint)
-
+        EVT_SIZE(self, self.OnSize)
 
 # control some of the main calendar attributes
 
@@ -611,6 +611,10 @@ class wxCalendar(wxWindow):
     def SetBusType(self):
         self.cal_type = "BUS"
 
+    def OnSize(self, evt):
+        self.Refresh(false)
+        evt.Skip()
+
     def OnPaint(self, event):
         DC = wxPaintDC(self)
         self.DoDrawing(DC)