Ejemplo n.º 1
0
    def __init__(
            self,
            parent,
            label,
            input_values,
            # Temporary workaround for bug #332
            filename,
            id_):
        self.box = wx.BoxSizer(wx.HORIZONTAL)

        self.slabel = wx.StaticText(parent, label=label)
        self.box.Add(self.slabel,
                     flag=wx.ALIGN_CENTER_VERTICAL | wx.RIGHT,
                     border=4)

        self.startw = DateHourCtrl(parent)
        self.startw.set_values(input_values['start_year'],
                               input_values['start_month'],
                               input_values['start_day'],
                               input_values['start_hour'],
                               input_values['start_minute'])
        self.box.Add(self.startw.get_main_panel())

        # Temporary workaround for bug #332
        # This widget is always placed at the top, so the previous
        #  Tab-traversal element is always the OK button
        wxgui_api.Bug332Workaround(
            self.startw.datectrl,
            wxscheduler_api.work_around_bug332(filename, id_),
            self.startw.hourctrl.hourctrl)
Ejemplo n.º 2
0
    def _create_alarm_date_widget(self):
        self.alarmw = DateHourCtrl(self.alarmchoicew.get_main_panel())
        self.alarmw.set_values(self.input_values['alarm_year'],
                               self.input_values['alarm_month'],
                               self.input_values['alarm_day'],
                               self.input_values['alarm_hour'],
                               self.input_values['alarm_minute'])

        # Temporary workaround for bug #332
        wxgui_api.Bug332Workaround(self.alarmw.datectrl,
                                   self.alarmchoicew.choicectrl,
                                   self.alarmw.hourctrl.hourctrl)

        return self.alarmw.get_main_panel()