def show_calendar(self, button): calendarbox = CalendarWindow(self._value, parent_window=self.parent_window) calendarbox.connect('on-change-calendar-window', self.do_change_calendar_window) entrypos = self.entry.get_allocation() parentpos = self.get_parent_window().get_position() if self.direction == 'up': calendarbox.move(parentpos[0] + entrypos.x, parentpos[1] + entrypos.y - calendarbox.get_size()[1]) else: calendarbox.move(parentpos[0] + entrypos.x, parentpos[1] + entrypos.y + entrypos.height) calendarbox.run()
def show_calendar(self, button): calendarbox = CalendarWindow(self._value, parent_window=self.parent_window) calendarbox.connect('on-change-calendar-window', self.do_change_calendar_window) entrypos = self.entry.get_allocation() parentpos = self.get_parent_window().get_position() if self.direction == 'up': calendarbox.move( parentpos[0] + entrypos.x, parentpos[1] + entrypos.y - calendarbox.get_size()[1]) else: calendarbox.move(parentpos[0] + entrypos.x, parentpos[1] + entrypos.y + entrypos.height) calendarbox.run()
def open_cal(self, button): cw = CalendarWindow(self, self.date) cw.connect('day-selected', self.day_selected, button)