当前位置: 首页>>代码示例>>Python>>正文


Python wx.FONTWEIGHT_BOLD属性代码示例

本文整理汇总了Python中wx.FONTWEIGHT_BOLD属性的典型用法代码示例。如果您正苦于以下问题:Python wx.FONTWEIGHT_BOLD属性的具体用法?Python wx.FONTWEIGHT_BOLD怎么用?Python wx.FONTWEIGHT_BOLD使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在wx的用法示例。


在下文中一共展示了wx.FONTWEIGHT_BOLD属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import FONTWEIGHT_BOLD [as 别名]
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 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:18,代码来源:PanelClass.py

示例2: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import FONTWEIGHT_BOLD [as 别名]
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) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:21,代码来源:AnimatedWindow.py

示例3: set_font_style

# 需要导入模块: import wx [as 别名]
# 或者: from wx import FONTWEIGHT_BOLD [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

示例4: make_bold

# 需要导入模块: import wx [as 别名]
# 或者: from wx import FONTWEIGHT_BOLD [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

示例5: h0

# 需要导入模块: import wx [as 别名]
# 或者: from wx import FONTWEIGHT_BOLD [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

示例6: h1

# 需要导入模块: import wx [as 别名]
# 或者: from wx import FONTWEIGHT_BOLD [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

示例7: _init_components

# 需要导入模块: import wx [as 别名]
# 或者: from wx import FONTWEIGHT_BOLD [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

示例8: _bold_static_text

# 需要导入模块: import wx [as 别名]
# 或者: from wx import FONTWEIGHT_BOLD [as 别名]
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 
开发者ID:lrq3000,项目名称:pyFileFixity,代码行数:8,代码来源:basic_config_panel.py

示例9: MakeBold

# 需要导入模块: import wx [as 别名]
# 或者: from wx import FONTWEIGHT_BOLD [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

示例10: _bold_static_text

# 需要导入模块: import wx [as 别名]
# 或者: from wx import FONTWEIGHT_BOLD [as 别名]
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 
开发者ID:lrq3000,项目名称:pyFileFixity,代码行数:8,代码来源:styling.py

示例11: H1

# 需要导入模块: import wx [as 别名]
# 或者: from wx import FONTWEIGHT_BOLD [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

示例12: add_label

# 需要导入模块: import wx [as 别名]
# 或者: from wx import FONTWEIGHT_BOLD [as 别名]
def add_label(self, label):
        h = ElectroStaticText(self.parent_widget, label=label)
        f = h.GetFont()
        f.SetWeight(wx.FONTWEIGHT_BOLD)
        h.SetFont(f)
        self.Add(h) 
开发者ID:kenorb-contrib,项目名称:BitTorrent,代码行数:8,代码来源:__init__.py

示例13: CreatePopupMenu

# 需要导入模块: import wx [as 别名]
# 或者: from wx import FONTWEIGHT_BOLD [as 别名]
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 
开发者ID:kenorb-contrib,项目名称:BitTorrent,代码行数:32,代码来源:DownloadManager.py

示例14: add_row

# 需要导入模块: import wx [as 别名]
# 或者: from wx import FONTWEIGHT_BOLD [as 别名]
def add_row(self, sizer, name, header, value=""):
        h = wx.StaticText(self.panel, label=header)
        f = h.GetFont()
        f.SetWeight(wx.FONTWEIGHT_BOLD)
        h.SetFont(f)
        sizer.Add(h)

        st = wx.StaticText(self.panel, label=value)
        sizer.Add(st)

        self.stats[name] = st 
开发者ID:kenorb-contrib,项目名称:BitTorrent,代码行数:13,代码来源:Bling.py

示例15: _init_frame

# 需要导入模块: import wx [as 别名]
# 或者: from wx import FONTWEIGHT_BOLD [as 别名]
def _init_frame(self):
        if self.frame:
            return

        self.frame = wx.Frame(
            self.ikalog_gui.frame, wx.ID_ANY, _("Options"), size=(640, 500))

        self.notebook = wx.Notebook(self.frame, wx.ID_ANY)

        # Apply button
        button_apply = wx.Button(self.frame, wx.ID_ANY, _(u'Apply'))

        # Use a bold font.
        apply_font = button_apply.GetFont()
        apply_font.SetWeight(wx.FONTWEIGHT_BOLD)
        button_apply.SetFont(apply_font)

        button_cancel = wx.Button(self.frame, wx.ID_ANY, _(u'Cancel'))
        button_load_default = wx.Button(
            self.frame, wx.ID_ANY, _(u'Load default'))

        buttons_sizer = wx.BoxSizer(wx.HORIZONTAL)
        buttons_sizer.Add(button_apply)
        buttons_sizer.Add(button_cancel)
        buttons_sizer.Add(button_load_default)

        top_sizer = wx.BoxSizer(wx.VERTICAL)
        top_sizer.Add(self.notebook)
        top_sizer.Add(buttons_sizer)

        self.frame.SetSizer(top_sizer)

        # Set event handlers for buttons.
        button_apply.Bind(wx.EVT_BUTTON, self.on_button_apply)
        button_cancel.Bind(wx.EVT_BUTTON, self.on_button_cancel)
        button_load_default.Bind(wx.EVT_BUTTON, self.on_button_load_default)

        outputs = [self.ikalog_gui.capture] + self.ikalog_gui.outputs
        self._init_outputs(outputs)

        # self.capture.panel is a part of self.frame. This Bind propagates
        # capture's source change to the preview.
        self.ikalog_gui.capture.panel.Bind(
            EVT_INPUT_INITIALIZED, self.ikalog_gui.on_input_initialized)

        # Refresh UI of each plugin.
        self.ikalog_gui.engine.call_plugins(
            'on_config_load_from_context', debug=True) 
开发者ID:hasegaw,项目名称:IkaLog,代码行数:50,代码来源:options.py


注:本文中的wx.FONTWEIGHT_BOLD属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。