+ b = wx.Button(self, -1, "Destroy the Calendar", pos = (250, 50))
+ self.Bind(wx.EVT_BUTTON, self.OnButton, id= b.GetId())
+ self.cal = cal
+
+ # Set up control to display a set of holidays:
+ self.Bind(calendar.EVT_CALENDAR_MONTH, self.OnChangeMonth, id=cal.GetId())
+ 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