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()
예제 #2
0
    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()
예제 #3
0
 def open_cal(self, button):
     cw = CalendarWindow(self, self.date)
     cw.connect('day-selected', self.day_selected, button)