|
alendarDateAttr(wx.WHITE, wx.BLUE, wx.WHITE,
+ wx.SWISS_FONT)
+ self.SetAttr(day, attr)
+
+ today = DateTime.today()
+ if ((today.year == mxstart.year) and (today.month == mxstart.month)):
+ self.SetHoliday(today.day)
+
+ self.Refresh()
+
+ def resetMonth(self):
+ for day in range(1,32):
+ self.ResetAttr(day)
+
+class MiniCalendar(Block.RectangularChild):
+ def __init__(self, *arguments, **keywords):
+ super (MiniCalendar, self).__init__(*arguments, **keywords)
+
+ def instantiateWidget(self):
+ return wxMiniCalendar(self.parentBlock.widget,
+ Block.Block.getWidgetID(self))
+
+ def onSelectedDateChangedEvent(self, notification):
+ self.widget.setSelectedDate(notification.data['start'])
|
|