def _create_font_size_sizer(self, settings, settings_key, title='Font Size'): f = IntegerChoiceEditor(settings, settings_key, title, [str(i) for i in range(8, 49)] ) font_size_sizer = wx.FlexGridSizer(rows=1, cols=1) font_size_sizer.AddMany([f.label(self), (f.chooser(self),)]) return font_size_sizer
def _create_font_editor(self): f = 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.Add(Label(self, label='Use fixed width font')) editor = wx.CheckBox(self) editor.SetValue(self._settings['fixed font']) editor.Bind( wx.EVT_CHECKBOX, lambda evt: self._settings.set( 'fixed font', editor.GetValue())) sizer.Add(editor) return sizer
def _create_font_editor(self): f = 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.Add(Label(self, label='Use fixed width font')) editor = wx.CheckBox(self) editor.SetValue(self._settings['fixed font']) editor.Bind(wx.EVT_CHECKBOX, lambda evt: self._settings.set('fixed font', editor.GetValue())) sizer.Add(editor) return sizer