+ b = wxButton(self, -1, "Destroy the Calendar", pos = (250, 50))
+ EVT_BUTTON(self, b.GetId(), self.OnButton)
+ self.cal = cal
+
+ # Set up control to display a set of holidays:
+ EVT_CALENDAR_MONTH(self, cal.GetId(), self.OnChangeMonth)
+ self.holidays = [(1,1), (10,31), (12,25) ] # (these don't move around)
+ self.OnChangeMonth()
+
+ def OnButton(self, evt):
+ self.cal.Destroy()
+ self.cal = None