I'm using the Caledar widget. When it displays, the current date is
selected, which is when I want. I've connected the "day-selected"
signal, so when I click on a date I can arrange for something to happen.
So far, so good.
The problem is when I click on the prev and next month (or year)
buttons, this signal is also activated and I can't work out how to tell
that a day hasn't been clicked.
Worse, when I click on a greyed out date, the signal is activated twice
- once for the date that was originally selected and once for the greyed
out date, which has been now been selected and the calendar view
adjusted appropriately.
Is there any way I can distinguish between these different events?
In case it matters, the (very simple) code I use is below.
Thanks and regards,
Chris
------------
cal=gtk.Calendar()
cal.display_options(
gtk.CALENDAR_SHOW_WEEK_NUMBERS +
gtk.CALENDAR_SHOW_HEADING +
gtk.CALENDAR_SHOW_DAY_NAMES
)
cal.connect("day-selected", self.selectday)
def selectday(self,w):
print w.get_date()
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/