From 943ca237540a8bdf62d87f0c94de7d0ad02c0e16 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 1 Feb 2002 02:48:21 +0000 Subject: [PATCH] Fix for bug #511057 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/demo/wxCalendar.py | 3 ++- wxPython/wxPython/lib/calendar.py | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/wxPython/demo/wxCalendar.py b/wxPython/demo/wxCalendar.py index 962679a351..181e79d85f 100644 --- a/wxPython/demo/wxCalendar.py +++ b/wxPython/demo/wxCalendar.py @@ -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 diff --git a/wxPython/wxPython/lib/calendar.py b/wxPython/wxPython/lib/calendar.py index d81f52f1c8..df66d76a9e 100644 --- a/wxPython/wxPython/lib/calendar.py +++ b/wxPython/wxPython/lib/calendar.py @@ -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) -- 2.47.2