Python wx.FONTFAMILY_DEFAULT Examples
The following are 30
code examples of wx.FONTFAMILY_DEFAULT().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
wx
, or try the search function
.
Example #1
Source File: misc.py From trelby with GNU General Public License v2.0 | 6 votes |
def __init__(self, parent, id, getCfgGui): wx.Window.__init__(self, parent, id, size = (MyStatus.WIDTH, TAB_BAR_HEIGHT), style = wx.FULL_REPAINT_ON_RESIZE) self.getCfgGui = getCfgGui self.page = 0 self.pageCnt = 0 self.elemType = "" self.tabNext = "" self.enterNext = "" self.elementFont = util.createPixelFont( TAB_BAR_HEIGHT // 2 + 6, wx.FONTFAMILY_DEFAULT, wx.NORMAL, wx.NORMAL) self.font = util.createPixelFont( TAB_BAR_HEIGHT // 2 + 2, wx.FONTFAMILY_DEFAULT, wx.NORMAL, wx.NORMAL) wx.EVT_PAINT(self, self.OnPaint)
Example #2
Source File: DeviceManager.py From meerk40t with MIT License | 6 votes |
def __set_properties(self): # begin wxGlade: DeviceManager.__set_properties self.SetTitle("Device Manager") self.devices_list.SetFont(wx.Font(13, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, "Segoe UI")) self.devices_list.AppendColumn(_("Id"), format=wx.LIST_FORMAT_LEFT, width=72) self.devices_list.AppendColumn(_("Driver"), format=wx.LIST_FORMAT_LEFT, width=119) self.devices_list.AppendColumn(_("State"), format=wx.LIST_FORMAT_LEFT, width=127) self.devices_list.AppendColumn(_("Location"), format=wx.LIST_FORMAT_LEFT, width=258) self.devices_list.AppendColumn(_("Boot"), format=wx.LIST_FORMAT_LEFT, width=51) self.new_device_button.SetToolTip(_("Add a new device")) self.new_device_button.SetSize(self.new_device_button.GetBestSize()) self.remove_device_button.SetToolTip(_("Remove selected device")) self.remove_device_button.SetSize(self.remove_device_button.GetBestSize()) self.device_properties_button.SetToolTip(_("View Device Properties")) self.device_properties_button.SetSize(self.device_properties_button.GetBestSize()) self.move_item_up_button.SetToolTip(_("Move device up")) self.move_item_up_button.SetSize(self.move_item_up_button.GetBestSize()) self.move_item_down_button.SetToolTip(_("Move device down")) self.move_item_down_button.SetSize(self.move_item_down_button.GetBestSize()) # end wxGlade
Example #3
Source File: About.py From meerk40t with MIT License | 6 votes |
def __do_layout(self): # begin wxGlade: About.__do_layout sizer_1 = wx.BoxSizer(wx.VERTICAL) sizer_2 = wx.BoxSizer(wx.HORIZONTAL) sizer_3 = wx.BoxSizer(wx.VERTICAL) sizer_3.Add(self.bitmap_button_1, 1, 0, 0) self.meerk40t_about_version_text.SetFont(wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, "Segoe UI")) sizer_3.Add(self.meerk40t_about_version_text, 0, 0, 0) sizer_2.Add(sizer_3, 1, wx.EXPAND, 0) meerk40t_about_text_header = wx.StaticText(self, wx.ID_ANY, "MeerK40t is a free MIT Licensed open source project for lasering on K40 Devices.\n\nParticipation in the project is highly encouraged. Past participation, and continuing participation is graciously thanked. This program is mostly the brainchild of Tatarize, who sincerely hopes his contributions will be but the barest trickle that becomes a raging river.") meerk40t_about_text_header.SetFont(wx.Font(12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, "Segoe UI")) sizer_2.Add(meerk40t_about_text_header, 2, wx.EXPAND, 0) sizer_1.Add(sizer_2, 1, wx.EXPAND, 0) meerk40t_about_text = wx.StaticText(self, wx.ID_ANY, "Thanks.\nLi Huiyu for their controller. \nScorch for lighting our path.\nAlois Zingl for his wonderful Bresenham plotting algorithms.\n@joerlane and all the MeerKittens, past and present, great and small.\n\nIcon8 for their great icons ( https://icons8.com/ ) used throughout the project.\nThe works of countless developers who made everything possible.\nRegebro for his svg.path module.\nThe SVG Working Group.\nHackers (in the general sense).") meerk40t_about_text.SetFont(wx.Font(12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, "Segoe UI")) sizer_1.Add(meerk40t_about_text, 2, wx.EXPAND, 0) self.SetSizer(sizer_1) self.Layout() self.Centre() # end wxGlade
Example #4
Source File: AnimatedWindow.py From EventGhost with GNU General Public License v2.0 | 6 votes |
def __init__(self, parent): wx.PyWindow.__init__(self, parent) self.font = wx.Font( 40, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_ITALIC, wx.FONTWEIGHT_BOLD ) self.SetBackgroundColour((255, 255, 255)) self.logo1 = GetInternalBitmap("opensource-55x48") self.logo2 = GetInternalBitmap("python-powered") self.logo3 = GetInternalBitmap("logo2") self.image = GetInternalImage("logo") self.bmpWidth = self.image.GetWidth() self.bmpHeight = self.image.GetHeight() self.time = clock() self.count = 0 self.Bind(wx.EVT_SIZE, self.OnSize) self.Bind(wx.EVT_TIMER, self.UpdateDrawing) self.OnSize(None) self.timer = wx.Timer(self) self.timer.Start(10)
Example #5
Source File: PanelClass.py From wxGlade with MIT License | 6 votes |
def __init__(self, *args, **kwds): # begin wxGlade: DebugPanel.__init__ kwds["style"] = kwds.get("style", 0) | wx.TAB_TRAVERSAL wx.Panel.__init__(self, *args, **kwds) self.SetFont(wx.Font(12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, 0, "")) sizer_2 = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, "sizer_2"), wx.VERTICAL) sizer_2.Add((0, 0), 0, 0, 0) self.SetSizer(sizer_2) self.Layout() # end wxGlade # end of class DebugPanel
Example #6
Source File: wx_util.py From pyFileFixity with MIT License | 5 votes |
def make_bold(statictext): pointsize = statictext.GetFont().GetPointSize() font = wx.Font(pointsize, wx.FONTFAMILY_DEFAULT, wx.FONTWEIGHT_NORMAL, wx.FONTWEIGHT_BOLD, False) statictext.SetFont(font)
Example #7
Source File: wx_util.py From pyFileFixity with MIT License | 5 votes |
def h1(parent, label): return _header(parent, label, (wx.FONTFAMILY_DEFAULT, wx.FONTWEIGHT_NORMAL, wx.FONTWEIGHT_BOLD, False))
Example #8
Source File: wx_util.py From me-ica with GNU Lesser General Public License v2.1 | 5 votes |
def make_bold(statictext): pointsize = statictext.GetFont().GetPointSize() font = wx.Font(pointsize, wx.FONTFAMILY_DEFAULT, wx.FONTWEIGHT_NORMAL, wx.FONTWEIGHT_BOLD, False) statictext.SetFont(font)
Example #9
Source File: wx_util.py From pyFileFixity with MIT License | 5 votes |
def h2(parent, label): return _header(parent, label, (wx.FONTFAMILY_DEFAULT, wx.FONTWEIGHT_NORMAL, wx.FONTWEIGHT_NORMAL, False))
Example #10
Source File: DownloadManager.py From BitTorrent with GNU General Public License v3.0 | 5 votes |
def CreatePopupMenu(self): menu = wx.Menu() if self.frame.IsShown(): toggle_label = _("Hide %s") else: toggle_label = _("Show %s") if False: toggle_item = wx.MenuItem(parentMenu=menu, id=self.TBMENU_TOGGLE, text=toggle_label%app_name, kind=wx.ITEM_NORMAL) font = toggle_item.GetFont() font.SetWeight(wx.FONTWEIGHT_BOLD) toggle_item.SetFont(font) #toggle_item.SetFont(wx.Font( # pointSize=8, # family=wx.FONTFAMILY_DEFAULT, # style=wx.FONTSTYLE_NORMAL, # weight=wx.FONTWEIGHT_BOLD)) menu.AppendItem(toggle_item) menu.AppendItem(wx.MenuItem(parentMenu=menu, id=self.TBMENU_CLOSE, text = _("Quit %s")%app_name, kind=wx.ITEM_NORMAL)) else: menu.Append(self.TBMENU_TOGGLE, toggle_label%app_name) menu.Append(self.TBMENU_CLOSE, _("Quit %s")%app_name) return menu
Example #11
Source File: tree.py From admin4 with Apache License 2.0 | 5 votes |
def __init__(self, parentWin, name, size=wx.DefaultSize, style=wx.TR_HAS_BUTTONS | wx.TR_HIDE_ROOT | wx.TR_LINES_AT_ROOT): wx.TreeCtrl.__init__(self, parentWin, size=size, style=style) self.SetImageList(adm.images) self.AddRoot(name) if wx.Platform != "__WXMSW__": pt=parentWin.GetFont().GetPointSize() * 0.95 # a little smaller font=wx.Font(pt, wx.FONTFAMILY_DEFAULT, wx.NORMAL, wx.NORMAL) self.SetFont(font)
Example #12
Source File: simplebook.py From wxGlade with MIT License | 5 votes |
def __init__(self, *args, **kwds): # begin wxGlade: MySimplebook.__init__ kwds["style"] = kwds.get("style", 0) | wx.NB_TOP wx.Simplebook.__init__(self, *args, **kwds) self.notebook_1_pane_1 = wx.Panel(self, wx.ID_ANY) self.AddPage(self.notebook_1_pane_1, "notebook_1_pane_1") sizer_2 = wx.BoxSizer(wx.VERTICAL) label_1 = wx.StaticText(self.notebook_1_pane_1, wx.ID_ANY, "Page 1 of Simplebook") label_1.SetFont(wx.Font(20, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, "")) sizer_2.Add(label_1, 0, wx.ALIGN_CENTER | wx.ALL, 20) self.button_1 = wx.Button(self.notebook_1_pane_1, wx.ID_ANY, "Show page 2") self.button_1.SetFont(wx.Font(16, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, "")) sizer_2.Add(self.button_1, 1, wx.ALL | wx.EXPAND, 20) self.notebook_1_notebook_1_pane_2 = wx.Panel(self, wx.ID_ANY) self.AddPage(self.notebook_1_notebook_1_pane_2, "notebook_1_pane_2") sizer_3 = wx.BoxSizer(wx.VERTICAL) label_2 = wx.StaticText(self.notebook_1_notebook_1_pane_2, wx.ID_ANY, "Page 2 of Simplebook") label_2.SetFont(wx.Font(20, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, "")) sizer_3.Add(label_2, 0, wx.ALIGN_CENTER | wx.ALL, 20) self.button_2 = wx.Button(self.notebook_1_notebook_1_pane_2, wx.ID_ANY, "Show page 1") self.button_2.SetFont(wx.Font(16, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, "")) sizer_3.Add(self.button_2, 1, wx.ALL | wx.EXPAND, 20) self.notebook_1_notebook_1_pane_2.SetSizer(sizer_3) self.notebook_1_pane_1.SetSizer(sizer_2) self.Bind(wx.EVT_BUTTON, lambda event: self.ChangeSelection(1), self.button_1) self.Bind(wx.EVT_BUTTON, lambda event: self.ChangeSelection(0), self.button_2) # end wxGlade # end of class MySimplebook
Example #13
Source File: RotarySettings.py From meerk40t with MIT License | 5 votes |
def __set_properties(self): # begin wxGlade: RotarySettings.__set_properties self.SetTitle("RotarySettings") self.checkbox_rotary.SetFont( wx.Font(12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, "Segoe UI")) self.checkbox_rotary.SetToolTip(_("Use Rotary Settings")) self.spin_rotary_scaley.SetMinSize((80, 23)) self.spin_rotary_scaley.SetToolTip(_("Rotary Scale Factor X")) self.spin_rotary_scaley.Enable(False) self.spin_rotary_scaley.SetIncrement(0.01) self.spin_rotary_scalex.SetMinSize((80, 23)) self.spin_rotary_scalex.SetToolTip(_("Rotary Scale Factor X")) self.spin_rotary_scalex.Enable(False) self.spin_rotary_scalex.SetIncrement(0.01) self.checkbox_rotary_loop.SetFont( wx.Font(12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, "Segoe UI")) self.checkbox_rotary_loop.SetToolTip(_("Use Rotary Settings")) self.spin_rotary_rotation.SetMinSize((80, 23)) self.spin_rotary_rotation.SetToolTip(_("Steps required for a full rotation")) self.spin_rotary_rotation.Enable(False) self.spin_rotary_roller_circumference.SetMinSize((80, 23)) self.spin_rotary_roller_circumference.SetToolTip(_("Circumference of roller")) self.spin_rotary_roller_circumference.Enable(False) self.spin_rotary_roller_circumference.SetIncrement(0.01) self.spin_rotary_object_circumference.SetMinSize((80, 23)) self.spin_rotary_object_circumference.SetToolTip(_("Circumference of object in rotary")) self.spin_rotary_object_circumference.Enable(False) self.spin_rotary_object_circumference.SetIncrement(0.01) # end wxGlade
Example #14
Source File: OLVPrinter.py From bookhub with MIT License | 5 votes |
def Normal(fontName="Arial"): """ Return a reasonable default format for a report """ fmt = ReportFormat() fmt.PageHeader.Font = wx.FFont(24, wx.FONTFAMILY_DEFAULT, face=fontName) fmt.PageHeader.TextAlignment = wx.ALIGN_CENTRE fmt.PageHeader.Add(FrameDecoration(pen=wx.Pen(wx.BLUE, 1), space=5)) #fmt.PageHeader.Add(LineDecoration(pen=wx.Pen(wx.BLUE, 2), space=5)) fmt.ReportHeader.Font = wx.FFont(36, wx.FONTFAMILY_DEFAULT, face=fontName) fmt.ReportHeader.TextColor = wx.RED fmt.ReportHeader.Padding = (0, 12, 0, 12) fmt.ListHeader.Add(LineDecoration(side=Decoration.BOTTOM, pen=wx.Pen(wx.GREEN, 1))) fmt.PageFooter.Font = wx.FFont(12, wx.FONTFAMILY_DEFAULT, face=fontName) fmt.PageFooter.TextAlignment = wx.ALIGN_RIGHT fmt.PageFooter.Add(LineDecoration(side=Decoration.TOP, pen=wx.Pen(wx.BLUE, 1), space=3)) fmt.Row.Font = wx.FFont(12, wx.FONTFAMILY_DEFAULT, face=fontName) #fmt.ColumnHeader.CellPadding=25 fmt.ColumnHeader.GridPen=wx.Pen(wx.RED, 1) fmt.Row.CellPadding=(10, 10, 0, 10) fmt.Row.GridPen=wx.Pen(wx.BLUE, 1) #fmt.ColumnHeader.Add(FrameDecoration(pen=wx.Pen(wx.RED, 1))) #fmt.Row.Add(FrameDecoration(pen=wx.Pen(wx.RED, 10))) #fmt.Row.Add(LineDecoration(side=Decoration.BOTTOM, pen=wx.Pen(wx.GREEN, 1))) return fmt #======================================================================
Example #15
Source File: ListCtrlPrinter.py From bookhub with MIT License | 5 votes |
def WatermarkFormat(self, font=None, color=None, angle=30, over=False): """ Change the format of the watermark printed on this report. The actual text of the water mark is set by `ListCtrlPrinter.Watermark` property. """ defaultFaceName = "Stencil" self.Watermark.Font = font or wx.FFont(96, wx.FONTFAMILY_DEFAULT, 0, defaultFaceName) self.Watermark.TextColor = color or wx.Colour(204, 204, 204) self.Watermark.Angle = angle self.Watermark.Over = over #---------------------------------------------------------------------------- # Standard formats # These are meant to be illustrative rather than definitive
Example #16
Source File: ListCtrlPrinter.py From bookhub with MIT License | 5 votes |
def Minimal(headerFontName="Arial", rowFontName="Times New Roman"): """ Return a minimal format for a report """ fmt = ReportFormat() fmt.IsShrinkToFit = False fmt.PageHeader.Font = wx.FFont(12, wx.FONTFAMILY_DEFAULT, face=headerFontName) fmt.PageHeader.Line(wx.BOTTOM, wx.BLACK, 1, space=5) fmt.PageHeader.Padding = (0, 0, 0, 12) fmt.ListHeader.Font = wx.FFont(18, wx.FONTFAMILY_DEFAULT, face=headerFontName) fmt.ListHeader.Padding = (0, 12, 0, 12) fmt.ListHeader.Line(wx.BOTTOM, wx.BLACK, 1, space=5) fmt.GroupTitle.Font = wx.FFont(12, wx.FONTFAMILY_DEFAULT, face=headerFontName) fmt.GroupTitle.Padding = (0, 12, 0, 12) fmt.GroupTitle.Line(wx.BOTTOM, wx.BLACK, 1, space=5) fmt.PageFooter.Font = wx.FFont(10, wx.FONTFAMILY_DEFAULT, face=headerFontName) fmt.PageFooter.Line(wx.TOP, wx.BLACK, 1, space=3) fmt.PageFooter.Padding = (0, 16, 0, 0) fmt.ColumnHeader.Font = wx.FFont(14, wx.FONTFAMILY_DEFAULT, wx.FONTFLAG_BOLD, face=headerFontName) fmt.ColumnHeader.Padding = (0, 12, 0, 12) fmt.ColumnHeader.CellPadding = 5 fmt.ColumnHeader.Line(wx.BOTTOM, wx.Colour(192, 192, 192), 1, space=3) fmt.ColumnHeader.AlwaysCenter = True fmt.Row.Font = wx.FFont(10, wx.FONTFAMILY_DEFAULT, face=rowFontName) fmt.Row.CellPadding = 5 fmt.Row.Line(wx.BOTTOM, wx.Colour(192, 192, 192), 1, space=3) fmt.Row.CanWrap = True return fmt
Example #17
Source File: ListCtrlPrinter.py From bookhub with MIT License | 5 votes |
def Normal(headerFontName="Gill Sans", rowFontName="Times New Roman"): """ Return a reasonable default format for a report """ fmt = ReportFormat() fmt.IsShrinkToFit = True fmt.PageHeader.Font = wx.FFont(12, wx.FONTFAMILY_DEFAULT, face=headerFontName) fmt.PageHeader.Line(wx.BOTTOM, wx.BLUE, 2, space=5) fmt.PageHeader.Padding = (0, 0, 0, 12) fmt.ListHeader.Font = wx.FFont(26, wx.FONTFAMILY_SWISS, wx.FONTFLAG_BOLD, face=headerFontName) fmt.ListHeader.TextColor = wx.WHITE fmt.ListHeader.Padding = (0, 12, 0, 12) fmt.ListHeader.TextAlignment = wx.ALIGN_LEFT fmt.ListHeader.Background(wx.BLUE, wx.WHITE, space=(16, 4, 0, 4)) fmt.GroupTitle.Font = wx.FFont(14, wx.FONTFAMILY_DEFAULT, face=headerFontName) fmt.GroupTitle.Line(wx.BOTTOM, wx.BLUE, 4, toColor=wx.WHITE, space=5) fmt.GroupTitle.Padding = (0, 12, 0, 12) fmt.PageFooter.Font = wx.FFont(10, wx.FONTFAMILY_DEFAULT, face=headerFontName) fmt.PageFooter.Background(wx.WHITE, wx.BLUE, space=(0, 4, 0, 4)) fmt.ColumnHeader.Font = wx.FFont(14, wx.FONTFAMILY_DEFAULT, wx.FONTFLAG_BOLD, face=headerFontName) fmt.ColumnHeader.CellPadding = 2 fmt.ColumnHeader.Background(wx.Colour(192, 192, 192)) fmt.ColumnHeader.GridPen = wx.Pen(wx.WHITE, 1) fmt.ColumnHeader.Padding = (0, 0, 0, 12) fmt.ColumnHeader.AlwaysCenter = True fmt.Row.Font = wx.FFont(12, wx.FONTFAMILY_DEFAULT, face=rowFontName) fmt.Row.Line(wx.BOTTOM, pen=wx.Pen(wx.BLUE, 1, wx.DOT), space=3) fmt.Row.CellPadding = 2 fmt.Row.CanWrap = True return fmt
Example #18
Source File: styling.py From pyFileFixity with MIT License | 5 votes |
def _bold_static_text(parent, text_label): text = wx.StaticText(parent, label=text_label) font_size = text.GetFont().GetPointSize() bold = wx.Font(font_size, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD) text.SetFont(bold) return text
Example #19
Source File: wx_util.py From me-ica with GNU Lesser General Public License v2.1 | 5 votes |
def h0(parent, label): text = wx.StaticText(parent, label=label) font_size = text.GetFont().GetPointSize() font = wx.Font(font_size * 1.4, *(wx.FONTFAMILY_DEFAULT, wx.FONTWEIGHT_NORMAL, wx.FONTWEIGHT_BOLD, False)) text.SetFont(font) return text
Example #20
Source File: wx_util.py From me-ica with GNU Lesser General Public License v2.1 | 5 votes |
def h1(parent, label): return _header(parent, label, (wx.FONTFAMILY_DEFAULT, wx.FONTWEIGHT_NORMAL, wx.FONTWEIGHT_BOLD, False))
Example #21
Source File: wx_util.py From me-ica with GNU Lesser General Public License v2.1 | 5 votes |
def h2(parent, label): return _header(parent, label, (wx.FONTFAMILY_DEFAULT, wx.FONTWEIGHT_NORMAL, wx.FONTWEIGHT_NORMAL, False))
Example #22
Source File: add_tool10.py From openplotter with GNU General Public License v2.0 | 5 votes |
def __init__(self): wx.Dialog.__init__(self, None, title=_('Standalone tool'), size=(130,230)) self.SetFont(wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)) panel = wx.Panel(self) self.settings_b = wx.Button(panel,label=_('settings') , pos=(20, 20)) self.start_b = wx.Button(panel, label=_('start'), pos=(20, 60)) self.stop_b = wx.Button(panel, label=_('stop'), pos=(20, 100)) self.cancel_b = wx.Button(panel, label=_('cancel'), pos=(20, 140)) self.Bind(wx.EVT_BUTTON, self.on_Button)
Example #23
Source File: add_tool10.py From openplotter with GNU General Public License v2.0 | 5 votes |
def __init__(self): self.ButtonNr = 1 wx.Dialog.__init__(self, None, title=_('Add individual name to serial port'), size=(130, 230)) self.SetFont(wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)) panel = wx.Panel(self) self.settings_b = wx.Button(panel, label=_('settings'), pos=(20, 20)) self.start_b = wx.Button(panel, label=_('start'), pos=(20, 60)) self.stop_b = wx.Button(panel, label=_('stop'), pos=(20, 100)) self.cancel_b = wx.Button(panel, label=_('cancel'), pos=(20, 140)) self.Bind(wx.EVT_BUTTON, self.on_Button)
Example #24
Source File: test_sms.py From openplotter with GNU General Public License v2.0 | 5 votes |
def __init__(self): self.option=sys.argv[1] self.text_sms=sys.argv[2] self.text_sms=unicode(self.text_sms,'utf-8') self.phone=sys.argv[3] self.conf = Conf() self.home = self.conf.home self.currentpath = self.home+self.conf.get('GENERAL', 'op_folder')+'/openplotter' Language(self.conf) wx.Frame.__init__(self, None, title=_('Test SMS'), size=(500,260)) self.SetFont(wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)) self.icon = wx.Icon(self.currentpath+'/openplotter.ico', wx.BITMAP_TYPE_ICO) self.SetIcon(self.icon) self.CreateStatusBar() self.text=wx.StaticText(self, label=_('Error'), pos=(10, 10)) self.output = wx.TextCtrl(self, style=wx.TE_MULTILINE|wx.TE_READONLY|wx.TE_DONTWRAP, size=(480,110), pos=(10,50)) self.button_close =wx.Button(self, label=_('Close'), pos=(300, 170)) self.Bind(wx.EVT_BUTTON, self.close, self.button_close) self.button_calculate =wx.Button(self, label=_('Start'), pos=(400, 170)) self.Bind(wx.EVT_BUTTON, self.calculate, self.button_calculate) if self.option=='i': self.text.SetLabel(_('Press start to check the settings and connect to the GSM device')) if self.option=='t': self.text.SetLabel(_('Press start to send the text "').decode('utf8')+self.text_sms+_('"\nto the number "').decode('utf8')+self.phone+'"') self.Centre()
Example #25
Source File: basic_config_panel.py From pyFileFixity with MIT License | 5 votes |
def _bold_static_text(self, text_label): text = wx.StaticText(self, label=text_label) font_size = text.GetFont().GetPointSize() bold = wx.Font(font_size, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD) text.SetFont(bold) return text
Example #26
Source File: styling.py From pyFileFixity with MIT License | 5 votes |
def MakeBold(statictext): pointsize = statictext.GetFont().GetPointSize() font = wx.Font(pointsize, wx.FONTFAMILY_DEFAULT, wx.FONTWEIGHT_NORMAL, wx.FONTWEIGHT_BOLD, False) statictext.SetFont(font)
Example #27
Source File: styling.py From pyFileFixity with MIT License | 5 votes |
def H1(parent, label): text = wx.StaticText(parent, label=label) font_size = text.GetFont().GetPointSize() font = wx.Font(font_size * 1.2, wx.FONTFAMILY_DEFAULT, wx.FONTWEIGHT_NORMAL, wx.FONTWEIGHT_BOLD, False) text.SetFont(font) return text
Example #28
Source File: NMEA_0183_generator.py From openplotter with GNU General Public License v2.0 | 4 votes |
def __init__(self): self.conf = Conf() self.home = self.conf.home self.currentpath = self.home+self.conf.get('GENERAL', 'op_folder')+'/openplotter' Language(self.conf) wx.Frame.__init__(self, None, title=_('NMEA 0183 generator'), size=(690,350)) self.SetFont(wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)) self.icon = wx.Icon(self.currentpath+'/openplotter.ico', wx.BITMAP_TYPE_ICO) self.SetIcon(self.icon) wx.StaticBox(self, label=_(' NMEA 0183 '), size=(670, 230), pos=(10, 10)) self.list_nmea = wx.ListCtrl(self, style=wx.LC_REPORT, size=(565, 200), pos=(15, 30)) self.list_nmea.InsertColumn(0, _('Sentence'), width=100) self.list_nmea.InsertColumn(1, _('Rate'), width=50) self.list_nmea.InsertColumn(2, _('Fields'), width=1500) self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.edit_nmea, self.list_nmea) self.add_nmea_button =wx.Button(self, label=_('add'), pos=(585, 30)) self.Bind(wx.EVT_BUTTON, self.add_nmea, self.add_nmea_button) self.delete_nmea_button =wx.Button(self, label=_('delete'), pos=(585, 65)) self.Bind(wx.EVT_BUTTON, self.delete_nmea, self.delete_nmea_button) self.compat_nmea_button =wx.Button(self, label=_('opencpn\ndefault'), pos=(585, 189)) self.Bind(wx.EVT_BUTTON, self.compat_nmea, self.compat_nmea_button) self.diagnostic_nmea_button=wx.Button(self, label=_('NMEA Diagnostic'), pos=(10, 250)) self.Bind(wx.EVT_BUTTON, self.kplex_diagnostic, self.diagnostic_nmea_button) self.diagnostic_sk_button=wx.Button(self, label=_('SK Diagnostic'), pos=(180, 250)) self.Bind(wx.EVT_BUTTON, self.sk_diagnostic, self.diagnostic_sk_button) self.CreateStatusBar() self.Centre() self.Show(True) self.read_sentences()
Example #29
Source File: SK-simulator.py From openplotter with GNU General Public License v2.0 | 4 votes |
def __init__(self): self.conf = conf self.home = home self.currentpath = self.home+self.conf.get('GENERAL', 'op_folder')+'/openplotter' self.tick=0 self.deg2rad=0.0174533 self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) self.Slider=[] self.Slider_v=[] self.HSlider=[] self.Slider_list=[] Language(self.conf) wx.Frame.__init__(self, None, title="SK-Simulator", size=(650,435)) self.Bind(wx.EVT_CLOSE, self.OnClose) self.panel = wx.Panel(self) self.vbox = wx.BoxSizer(wx.VERTICAL) self.ttimer=500 self.timer = wx.Timer(self) self.Bind(wx.EVT_TIMER, self.timer_act, self.timer) self.SetFont(wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)) self.icon = wx.Icon(self.currentpath+'/openplotter.ico', wx.BITMAP_TYPE_ICO) self.SetIcon(self.icon) self.read_conf() #self.SK_Slider(0,'navigation.courseOverGroundTrue',0,0,360,self.deg2rad,0) for i in self.Slider_list: self.SK_Slider_conf(i[0],i[1],i[2],i[3],i[4],i[5],i[6]) self.Bind(wx.EVT_CHECKBOX, self.on_change_checkbox) allBtn = wx.Button(self.panel, label=_('all'),size=(70, 32), pos=(450, 360)) allBtn.Bind(wx.EVT_BUTTON, self.allBtn) noneBtn = wx.Button(self.panel, label=_('none'),size=(70, 32), pos=(550, 360)) noneBtn.Bind(wx.EVT_BUTTON, self.noneBtn) HButton = wx.BoxSizer(wx.HORIZONTAL) HButton.Add((0,0), 1, wx.ALL|wx.EXPAND, 5) HButton.Add(noneBtn, 0, wx.ALL|wx.EXPAND, 5) HButton.Add(allBtn, 0, wx.ALL|wx.EXPAND, 5) self.vbox.Add((0,0), 1, wx.ALL|wx.EXPAND, 5) self.vbox.Add(HButton, 0, wx.ALL|wx.EXPAND, 5) self.panel.SetSizer(self.vbox) self.Centre() self.Show(True) self.timer.Start(self.ttimer)
Example #30
Source File: FontTest.py From wxGlade with MIT License | 4 votes |
def __init__(self, *args, **kwds): # begin wxGlade: MyFrame.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) self.SetSize((400, 300)) self.SetTitle("frame") sizer_1 = wx.BoxSizer(wx.VERTICAL) self.text_ctrl_1 = wx.TextCtrl(self, wx.ID_ANY, "Some Input", style=wx.TE_READONLY) self.text_ctrl_1.SetBackgroundColour(wx.Colour(0, 255, 127)) self.text_ctrl_1.SetForegroundColour(wx.Colour(255, 0, 0)) self.text_ctrl_1.SetFont(wx.Font(16, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, 0, "")) self.text_ctrl_1.SetFocus() sizer_1.Add(self.text_ctrl_1, 1, wx.ALL | wx.EXPAND, 5) label_1 = wx.StaticText(self, wx.ID_ANY, "label_1") sizer_1.Add(label_1, 0, 0, 0) label_2 = wx.StaticText(self, wx.ID_ANY, "label_2") label_2.SetFont(wx.Font(8, wx.FONTFAMILY_DECORATIVE, wx.FONTSTYLE_SLANT, wx.FONTWEIGHT_LIGHT, 0, "")) sizer_1.Add(label_2, 0, 0, 0) label_3 = wx.StaticText(self, wx.ID_ANY, "label_3") label_3.SetFont(wx.Font(8, wx.FONTFAMILY_ROMAN, wx.FONTSTYLE_ITALIC, wx.FONTWEIGHT_BOLD, 0, "")) sizer_1.Add(label_3, 0, 0, 0) label_4 = wx.StaticText(self, wx.ID_ANY, "label_4") label_4.SetFont(wx.Font(8, wx.FONTFAMILY_SCRIPT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, "")) sizer_1.Add(label_4, 0, 0, 0) label_5 = wx.StaticText(self, wx.ID_ANY, "label_5") label_5.SetFont(wx.Font(10, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, "")) sizer_1.Add(label_5, 0, 0, 0) label_6 = wx.StaticText(self, wx.ID_ANY, "label_6") label_6.SetFont(wx.Font(12, wx.FONTFAMILY_MODERN, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 1, "")) sizer_1.Add(label_6, 0, 0, 0) self.SetSizer(sizer_1) self.Layout() # end wxGlade # end of class MyFrame