當前位置: 首頁>>代碼示例>>Python>>正文


Python wx.FONTWEIGHT_NORMAL屬性代碼示例

本文整理匯總了Python中wx.FONTWEIGHT_NORMAL屬性的典型用法代碼示例。如果您正苦於以下問題:Python wx.FONTWEIGHT_NORMAL屬性的具體用法?Python wx.FONTWEIGHT_NORMAL怎麽用?Python wx.FONTWEIGHT_NORMAL使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在wx的用法示例。


在下文中一共展示了wx.FONTWEIGHT_NORMAL屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: ComputeFontScale

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import FONTWEIGHT_NORMAL [as 別名]
def ComputeFontScale():
    """
    Compute the font scale.
    
    A global variable to hold the scaling from pixel size to point size.
    """
    global FontScale
    dc = wx.ScreenDC()
    dc.SetFont(wx.Font(16, wx.FONTFAMILY_ROMAN, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL))
    E = dc.GetTextExtent("X")
    FontScale = 16/E[1]
    del dc

# why do we do this here, causes a Sphinx build crash
#ComputeFontScale()    

## fixme: This should probably be re-factored into a class 
開發者ID:dougthor42,項目名稱:wafer_map,代碼行數:19,代碼來源:FCObjects.py

示例2: draw_monitor_numbers

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import FONTWEIGHT_NORMAL [as 別名]
def draw_monitor_numbers(self, use_ppi_px):
        font = wx.Font(24, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)
        font_clr = wx.Colour(60, 60, 60, alpha=wx.ALPHA_OPAQUE)

        for st_bmp in self.preview_img_list:
            bmp = st_bmp.GetBitmap()
            dc = wx.MemoryDC(bmp)
            text = str(self.preview_img_list.index(st_bmp))
            dc.SetTextForeground(font_clr)
            dc.SetFont(font)
            dc.DrawText(text, 5, 5)
            del dc
            st_bmp.SetBitmap(bmp)

        if use_ppi_px:
            self.draw_monitor_sizes() 
開發者ID:hhannine,項目名稱:superpaper,代碼行數:18,代碼來源:gui.py

示例3: __do_layout

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import FONTWEIGHT_NORMAL [as 別名]
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 
開發者ID:meerk40t,項目名稱:meerk40t,代碼行數:22,代碼來源:About.py

示例4: __set_properties

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import FONTWEIGHT_NORMAL [as 別名]
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 
開發者ID:meerk40t,項目名稱:meerk40t,代碼行數:22,代碼來源:DeviceManager.py

示例5: set_font_style

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import FONTWEIGHT_NORMAL [as 別名]
def set_font_style(self, style):
    pointsize = self.cmd_textbox.GetFont().GetPointSize()
    font = wx.Font(pointsize, style,
                 wx.FONTWEIGHT_NORMAL, wx.FONTWEIGHT_BOLD, False)
    self.cmd_textbox.SetFont(font) 
開發者ID:ME-ICA,項目名稱:me-ica,代碼行數:7,代碼來源:runtime_display_panel.py

示例6: make_bold

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import FONTWEIGHT_NORMAL [as 別名]
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) 
開發者ID:ME-ICA,項目名稱:me-ica,代碼行數:7,代碼來源:wx_util.py

示例7: h0

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import FONTWEIGHT_NORMAL [as 別名]
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 
開發者ID:ME-ICA,項目名稱:me-ica,代碼行數:8,代碼來源:wx_util.py

示例8: h1

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import FONTWEIGHT_NORMAL [as 別名]
def h1(parent, label):
  return _header(parent, label, (wx.FONTFAMILY_DEFAULT, wx.FONTWEIGHT_NORMAL, wx.FONTWEIGHT_BOLD, False)) 
開發者ID:ME-ICA,項目名稱:me-ica,代碼行數:4,代碼來源:wx_util.py

示例9: h2

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import FONTWEIGHT_NORMAL [as 別名]
def h2(parent, label):
  return _header(parent, label, (wx.FONTFAMILY_DEFAULT, wx.FONTWEIGHT_NORMAL, wx.FONTWEIGHT_NORMAL, False)) 
開發者ID:ME-ICA,項目名稱:me-ica,代碼行數:4,代碼來源:wx_util.py

示例10: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import FONTWEIGHT_NORMAL [as 別名]
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) 
開發者ID:sailoog,項目名稱:openplotter,代碼行數:14,代碼來源:add_tool10.py

示例11: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import FONTWEIGHT_NORMAL [as 別名]
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) 
開發者ID:sailoog,項目名稱:openplotter,代碼行數:14,代碼來源:add_tool10.py

示例12: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import FONTWEIGHT_NORMAL [as 別名]
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() 
開發者ID:sailoog,項目名稱:openplotter,代碼行數:41,代碼來源:test_sms.py

示例13: _init_components

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import FONTWEIGHT_NORMAL [as 別名]
def _init_components(self):
    self.text = wx.StaticText(self, label=i18n._("status"))
    self.cmd_textbox = wx.TextCtrl(
      self, -1, "",
      style=wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_RICH)
    if self.build_spec.get('monospace_display'):
      pointsize = self.cmd_textbox.GetFont().GetPointSize()
      font = wx.Font(pointsize, wx.FONTFAMILY_MODERN,
                   wx.FONTWEIGHT_NORMAL, wx.FONTWEIGHT_BOLD, False)
      self.cmd_textbox.SetFont(font) 
開發者ID:lrq3000,項目名稱:pyFileFixity,代碼行數:12,代碼來源:runtime_display_panel.py

示例14: MakeBold

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import FONTWEIGHT_NORMAL [as 別名]
def MakeBold(statictext):
  pointsize = statictext.GetFont().GetPointSize()
  font = wx.Font(pointsize, wx.FONTFAMILY_DEFAULT,
                 wx.FONTWEIGHT_NORMAL, wx.FONTWEIGHT_BOLD, False)
  statictext.SetFont(font) 
開發者ID:lrq3000,項目名稱:pyFileFixity,代碼行數:7,代碼來源:styling.py

示例15: H1

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import FONTWEIGHT_NORMAL [as 別名]
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 
開發者ID:lrq3000,項目名稱:pyFileFixity,代碼行數:8,代碼來源:styling.py


注:本文中的wx.FONTWEIGHT_NORMAL屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。