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
self.set_day = None
EVT_PAINT(self, self.OnPaint)
-
+ EVT_SIZE(self, self.OnSize)
# control some of the main calendar attributes
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)