def _create_editors(self, settings): return [ widgets.StringChoiceEditor(settings, 'default file format', 'Default file format:', ('txt', 'tsv', 'html', 'robot', 'resource') ), widgets.StringChoiceEditor(settings, 'txt format separator', 'TXT format separator:', ('pipe', 'space') ), widgets.StringChoiceEditor(settings, 'line separator', 'Line separator:', ('native', 'CRLF', 'LF'), 'Possible values are native (of current OS) CRLF (Windows) and LF (Unixy)' ), widgets.IntegerChoiceEditor(settings, 'txt number of spaces', 'Separating spaces', [str(i) for i in range(2, 11)], 'Number of spaces between cells when saving in txt format' ) ]
def _create_font_editor(self): f = widgets.IntegerChoiceEditor( self._settings, 'font size', 'Font Size', [str(i) for i in range(8, 16)]) sizer = wx.FlexGridSizer(rows=2, cols=2, hgap=30) sizer.AddMany([f.label(self), f.chooser(self)]) if 'fixed font' in self._settings: sizer.AddMany(widgets.boolean_editor( self, self._settings, 'fixed font', 'Use fixed width font')) return sizer
def _create_font_editor(self): f = widgets.IntegerChoiceEditor( self._settings, 'font size', 'Font Size', [str(i) for i in range(8, 16)]) sizer = wx.FlexGridSizer(rows=3, cols=2, vgap=10, hgap=30) sizer.AddMany([f.label(self), f.chooser(self)]) fixed_font = False if 'zoom factor' in self._settings: z = widgets.SpinChoiceEditor( self._settings, 'zoom factor', 'Zoom Factor', (-10, 20)) sizer.AddMany([z.label(self), z.chooser(self)]) if 'fixed font' in self._settings: sizer.AddMany(widgets.boolean_editor( self, self._settings, 'fixed font', 'Use fixed width font')) fixed_font = self._settings['fixed font'] if 'font face' in self._settings: s = widgets.StringChoiceEditor(self._settings, 'font face', 'Font Face', ReadFonts(fixed_font)) sizer.AddMany([s.label(self), s.chooser(self)]) return sizer