コード例 #1
0
 def _build_controls(self):
     self._search_button = ButtonWithHandler(self, 'Search')
     self._abort_button = ButtonWithHandler(self, 'Abort')
     self._status_label = Label(self, label='')
     controls = wx.BoxSizer(wx.HORIZONTAL)
     controls.Add(self._search_button, 0, wx.ALL, 3)
     controls.Add(self._abort_button, 0, wx.ALL, 3)
     controls.Add(self._status_label, 1, wx.ALL | wx.EXPAND, 3)
     self.Sizer.Add(controls, 0, wx.ALL | wx.EXPAND, 3)
コード例 #2
0
 def _build_controls(self):
     self._clear_button = ButtonWithHandler(self, 'Refresh', self.OnClear)
     self._show_tagged_tests_button = ButtonWithHandler(self, 'Included Tag Search')
     self._show_excluded_tests_button = ButtonWithHandler(self, 'Excluded Tag Search')
     controls = wx.BoxSizer(wx.HORIZONTAL)
     controls.Add(self._show_tagged_tests_button, 0, wx.ALL, 3)
     controls.Add(self._show_excluded_tests_button, 0, wx.ALL, 3)
     controls.Add(self._clear_button, 0, wx.ALL, 3)
     self.Sizer.Add(controls, 0, wx.ALL | wx.EXPAND, 3)
コード例 #3
0
 def _create_buttons(self):
     sizer = wx.BoxSizer(wx.VERTICAL)
     sizer.Add(Label(
         self, label='Add Import', size=wx.Size(120, 20),
         style=wx.ALIGN_CENTER))
     for label in self._buttons:
         sizer.Add(ButtonWithHandler(self, label, width=120), 0, wx.ALL, 1)
     return sizer
コード例 #4
0
 def _create_search(self, container_sizer):
     container_sizer.AddSpacer(20)
     self._search_field = TextField(self, '', process_enters=True)
     self._search_field.Bind(wx.EVT_TEXT_ENTER, self.OnFind)
     container_sizer.add_with_padding(self._search_field)
     container_sizer.add_with_padding(
         ButtonWithHandler(self, 'Search', handler=self.OnFind))
     self._search_field_notification = Label(self, label='')
     container_sizer.add_with_padding(self._search_field_notification)
コード例 #5
0
ファイル: texteditor.py プロジェクト: urska19/Plone_site
 def _create_editor_toolbar(self):
     # needs extra container, since we might add helper text about syntax colorization
     self.editor_toolbar = HorizontalSizer()
     default_components = HorizontalSizer()
     default_components.add_with_padding(
         ButtonWithHandler(self, 'Apply Changes', handler=lambda e: self.save()))
     self._create_search(default_components)
     self.editor_toolbar.add_expanding(default_components)
     self.Sizer.add_expanding(self.editor_toolbar, propotion=0)
コード例 #6
0
 def _create_controls(self):
     sizer = wx.BoxSizer(wx.HORIZONTAL)
     sizer.Add((5, 0))
     sizer.Add(Label(
         self, label=self._controller.label,
         size=(context.SETTING_LABEL_WIDTH, context.SETTING_ROW_HEIGTH)))
     self._value_display = self._create_value_display()
     self.update_value()
     self._tooltip = self._get_tooltip()
     sizer.Add(self._value_display, 1, wx.EXPAND)
     self._add_edit(sizer)
     sizer.Add(ButtonWithHandler(self, 'Clear'))
     sizer.Layout()
     self.SetSizer(sizer)
コード例 #7
0
ファイル: runprofiles.py プロジェクト: charles20cent/RIDE
    def _get_log_options_panel(self, parent):
        collapsible_pane = wx.CollapsiblePane(
            parent, wx.ID_ANY, 'Log options',
            style=wx.CP_DEFAULT_STYLE | wx.CP_NO_TLW_RESIZE)
        collapsible_pane.Bind(wx.EVT_COLLAPSIBLEPANE_CHANGED,
                              self.OnCollapsiblePaneChanged,
                              collapsible_pane)
        pane = collapsible_pane.GetPane()
        pane.SetBackgroundColour(self._mysettings.color_background)
        pane.SetForegroundColour(self._mysettings.color_foreground)
        label = Label(pane, label="Output directory: ")
        self._output_directory_text_ctrl = \
            self._create_text_ctrl(pane, self.output_directory,
                                   "removed due unicode_error (delete this)",
                                   self.OnOutputDirectoryChanged)
        self._output_directory_text_ctrl.SetBackgroundColour(self._mysettings.color_secondary_background)
        self._output_directory_text_ctrl.SetForegroundColour(self._mysettings.color_secondary_foreground)
        button = ButtonWithHandler(pane, "...", self._handle_select_directory)
        button.SetBackgroundColour(self._mysettings.color_secondary_background)
        button.SetForegroundColour(self._mysettings.color_secondary_foreground)
        horizontal_sizer = wx.BoxSizer(wx.HORIZONTAL)
        horizontal_sizer.Add(label, 0,
                             wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 10)
        horizontal_sizer.Add(self._output_directory_text_ctrl, 1, wx.EXPAND)
        horizontal_sizer.Add(button, 0, wx.LEFT | wx.RIGHT, 10)

        suite_name_outputs_cb = self._create_checkbox(
            pane, self.are_log_names_with_suite_name,
            "Add suite name to log names", self.OnSuiteNameOutputsCheckBox)
        timestamp_outputs_cb = self._create_checkbox(
            pane, self.are_log_names_with_timestamp,
            "Add timestamp to log names", self.OnTimestampOutputsCheckbox)
        save_logs_cb = self._create_checkbox(
            pane, self.are_saving_logs,
            "Save Console and Message logs", self.OnSaveLogsCheckbox)

        vertical_sizer = wx.BoxSizer(wx.VERTICAL)
        vertical_sizer.Add(horizontal_sizer, 0, wx.EXPAND)
        vertical_sizer.Add(suite_name_outputs_cb, 0, wx.LEFT | wx.TOP, 10)
        vertical_sizer.Add(timestamp_outputs_cb, 0, wx.LEFT | wx.TOP, 10)
        vertical_sizer.Add(save_logs_cb, 0, wx.LEFT | wx.TOP | wx.BOTTOM, 10)
        pane.SetSizer(vertical_sizer)
        return collapsible_pane
コード例 #8
0
 def __init__(self, parent, header, usages_callback):
     HorizontalSizer.__init__(self)
     self._header = HeaderLabel(parent, header)
     self.add_expanding(self._header)
     self.add(ButtonWithHandler(parent, 'Find Usages', usages_callback))
コード例 #9
0
 def _add_view_components(self):
     self.Sizer.Add(ButtonWithHandler(self, 'Go to definition'), 0, wx.ALL,
                    3)
コード例 #10
0
ファイル: preview.py プロジェクト: yvdhi/RIDE
 def _print_button(self):
     return ButtonWithHandler(self, 'Print')
コード例 #11
0
 def _add_keyword_details(self):
     self._details = HtmlWindow(self)
     self._add_to_sizer(self._details)
     self._find_usages_button = ButtonWithHandler(self, 'Find Usages')
     self.Sizer.Add(self._find_usages_button, 0, wx.ALL, 3)
コード例 #12
0
ファイル: settingeditors.py プロジェクト: MEDBEDb/RIDE
 def _add_edit(self, sizer):
     sizer.Add(ButtonWithHandler(self, 'Edit'),
               flag=wx.LEFT | wx.RIGHT,
               border=5)
コード例 #13
0
ファイル: listeditor.py プロジェクト: lf1687/MyTools
 def _create_buttons(self):
     sizer = wx.BoxSizer(wx.VERTICAL)
     for label in self._buttons:
         sizer.Add(ButtonWithHandler(self, label, width=120), 0, wx.ALL, 1)
     return sizer