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


Python wx.NORMAL属性代码示例

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


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

示例1: __init__

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

示例2: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NORMAL [as 别名]
def __init__(self,
                 String,
                 xy,
                 Size=24,
                 Color="Black",
                 BackgroundColor=None,
                 Family=wx.MODERN,
                 Style=wx.NORMAL,
                 Weight=wx.NORMAL,
                 Underlined=False,
                 Font=None):
        FloatCanvas.Text.__init__(self,
                                  String,
                                  xy,
                                  Size=Size,
                                  Color=Color,
                                  BackgroundColor=BackgroundColor,
                                  Family=Family,
                                  Style=Style,
                                  Weight=Weight,
                                  Underlined=Underlined,
                                  Font=Font) 
开发者ID:dougthor42,项目名称:wafer_map,代码行数:24,代码来源:wm_legend.py

示例3: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NORMAL [as 别名]
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.SetTitle(_("MyFrame"))

        sizer_1 = wx.BoxSizer(wx.VERTICAL)

        self.label_1 = wx.StaticText(self, wx.ID_ANY, _("Extraproperty example"))
        self.label_1.SetFont(wx.Font(40, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, ""))
        self.label_1.SetFoobar(1)
        sizer_1.Add(self.label_1, 1, wx.ALL, 5)

        self.SetSizer(sizer_1)
        sizer_1.Fit(self)

        self.Layout()
        # end wxGlade

# end of class MyFrame 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:22,代码来源:bug163.py

示例4: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NORMAL [as 别名]
def __init__(self, *args, **kwargs):
        wx.grid.Grid.__init__(self, *args, **kwargs)

        self.Editable = True

        self.AddButton = None
        self.DeleteButton = None
        self.UpButton = None
        self.DownButton = None

        self.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL, False, 'Sans'))
        self.SetLabelFont(wx.Font(10, wx.DEFAULT, wx.NORMAL, wx.NORMAL, False, 'Sans'))
        self.SetSelectionBackground(wx.WHITE)
        self.SetSelectionForeground(wx.BLACK)
        self.DisableDragRowSize()

        self.Bind(wx.grid.EVT_GRID_SELECT_CELL, self.OnSelectCell)
        self.Bind(wx.grid.EVT_GRID_EDITOR_HIDDEN, self.OnEditorHidden)
        self.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown) 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:21,代码来源:CustomGrid.py

示例5: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NORMAL [as 别名]
def __init__(self, parent, tip, restricted=True):
        """
        Constructor
        @param parent: Parent window
        @param tip: Tip text (may be multiline)
        @param restricted: Tool tip must follow size restriction in line and
            characters number defined (default True)
        """
        wx.PopupWindow.__init__(self, parent)

        self.Restricted = restricted

        self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM)
        self.SetTip(tip)

        # Initialize text font style
        self.Font = wx.Font(
            faces["size"],
            wx.SWISS,
            wx.NORMAL,
            wx.NORMAL,
            faceName=faces["mono"])

        self.Bind(wx.EVT_PAINT, self.OnPaint) 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:26,代码来源:CustomToolTip.py

示例6: __set_properties

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NORMAL [as 别名]
def __set_properties(self):
        # begin wxGlade: FrameTerminal.__set_properties
        #self.SetTitle("serialAssist")
        _icon = wx.EmptyIcon()

	path = self.outputwin.workingdir

        _icon.CopyFromBitmap(wx.Bitmap(path + "/../images/zulu_logo16x16.png", wx.BITMAP_TYPE_ANY))
        self.SetIcon(_icon)
        #self.SetSize((543, 433))
        self.SetSize((743, 560))
        self.frame_statusbar.SetStatusWidths([-1])
        # statusbar fields
        frame_statusbar_fields = [""]
        for i in range(len(frame_statusbar_fields)):
            self.frame_statusbar.SetStatusText(frame_statusbar_fields[i], i)
        self.frame_toolbar.SetToolBitmapSize((32, 32))
        self.frame_toolbar.SetToolSeparation(9)
        self.frame_toolbar.Realize()
        self.text_ctrl_output.SetFont(wx.Font(11, wx.DEFAULT,
                                              wx.NORMAL, wx.NORMAL, 0, ""))
        # end wxGlade 
开发者ID:nccgroup,项目名称:Zulu,代码行数:24,代码来源:easyshell.py

示例7: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NORMAL [as 别名]
def __init__(self, parent):
        wx.Window.__init__(self, parent, -1)

        self.selected = None

        # all valid characters
        self.chars = ""

        for i in xrange(256):
            if util.isValidInputChar(i):
                self.chars += chr(i)

        self.cols = 16
        self.rows = len(self.chars) // self.cols
        if len(self.chars) % 16:
            self.rows += 1

        # offset of grid
        self.offset = 5

        # size of a single character cell
        self.cellSize = 32

        # size of the zoomed-in character boxes
        self.boxSize = 60

        self.smallFont = util.createPixelFont(18,
            wx.FONTFAMILY_SWISS, wx.NORMAL, wx.NORMAL)
        self.normalFont = util.createPixelFont(self.cellSize - 2,
            wx.FONTFAMILY_MODERN, wx.NORMAL, wx.BOLD)
        self.bigFont = util.createPixelFont(self.boxSize - 2,
            wx.FONTFAMILY_MODERN, wx.NORMAL, wx.BOLD)

        wx.EVT_PAINT(self, self.OnPaint)
        wx.EVT_LEFT_DOWN(self, self.OnLeftDown)
        wx.EVT_MOTION(self, self.OnMotion)
        wx.EVT_SIZE(self, self.OnSize)

        util.setWH(self, self.cols * self.cellSize + 2 * self.offset, 460) 
开发者ID:trelby,项目名称:trelby,代码行数:41,代码来源:charmapdlg.py

示例8: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NORMAL [as 别名]
def __init__(self, parent, sync_model):
        wx.Panel.__init__(self, parent, style=wx.RAISED_BORDER)

        headerFont = wx.Font(11.5, wx.SWISS, wx.NORMAL, wx.NORMAL)

        self.sync_model = sync_model
        self.dstc = GoSyncDriveTree(self, pos=(0,0))

        self.t1 = wx.StaticText(self, -1, "Choose the directories to sync:", pos=(0,0))
        self.t1.SetFont(headerFont)

        self.cb = wx.CheckBox(self, -1, 'Sync Everything', (10, 10))
        self.cb.SetValue(True)
        self.cb.Disable()
        self.dstc.Disable()
        self.cb.Bind(wx.EVT_CHECKBOX, self.SyncSetting)

        self.Bind(CT.EVT_TREE_ITEM_CHECKED, self.ItemChecked)

        GoSyncEventController().BindEvent(self, GOSYNC_EVENT_CALCULATE_USAGE_DONE,
                                          self.RefreshTree)
        GoSyncEventController().BindEvent(self, GOSYNC_EVENT_CALCULATE_USAGE_STARTED,
                                          self.OnUsageCalculationStarted)

        self.cb.Bind(wx.EVT_CHECKBOX, self.SyncSetting)

        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(self.t1, 0, wx.ALL)
        sizer.Add(self.cb, 0, wx.ALL)
        sizer.Add(self.dstc, 1, wx.EXPAND,2)
        self.SetSizer(sizer) 
开发者ID:hschauhan,项目名称:gosync,代码行数:33,代码来源:GoSyncSelectionPage.py

示例9: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NORMAL [as 别名]
def __init__(self, parent, mainwin, ID):
		""" mainwin is the main panel so we can bind buttons to actions in the main frame """
		scrolled.ScrolledPanel.__init__(self, parent)
	
		statusTitle = wx.StaticText(self, wx.ID_ANY, ID)
		font = wx.Font(12,wx.DEFAULT, wx.NORMAL,wx.NORMAL)
		statusTitle.SetFont(font)

		self.StatusTextBox = wx.TextCtrl(self,wx.ID_ANY,"",style=wx.TE_READONLY|wx.TE_MULTILINE)
		#self.StatusTextBox.Size.SetHeight(500)
		
		self.SaveBtn = wx.Button(self,wx.ID_ANY,"Save Text to file",size=(100,-1))
		self.Bind(wx.EVT_BUTTON,self.OnSave,self.SaveBtn)
		
		
		panel_sizer = wx.BoxSizer(wx.VERTICAL)
		panel_sizer.Add((-1,10),0,wx.EXPAND)
		panel_sizer.Add(statusTitle,0,wx.EXPAND|wx.LEFT,border=20)
		panel_sizer.Add((-1,10),0,wx.EXPAND)
		panel_sizer.Add(self.StatusTextBox,1,wx.EXPAND|wx.LEFT|wx.RIGHT,border=40)
		panel_sizer.Add((-1,10),0,wx.EXPAND)
		panel_sizer.Add(self.SaveBtn,0,wx.EXPAND|wx.LEFT|wx.RIGHT,border=40)
		panel_sizer.Add((-1,20),0,wx.EXPAND)
		

		self.SetSizer(panel_sizer)
		self.SetupScrolling()
		self.Layout() 
开发者ID:jameskeaveney,项目名称:ElecSus,代码行数:30,代码来源:elecsus_gui.py

示例10: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NORMAL [as 别名]
def __init__(self, parent, buildSpec, **kwargs):
        wx.Panel.__init__(self, parent, **kwargs)
        self.buildSpec = buildSpec

        self.text = wx.StaticText(self, label=_("status"))
        if buildSpec["richtext_controls"]:
            from .widgets.richtextconsole import RichTextConsole
            self.textbox = RichTextConsole(self)
        else:
            self.textbox = BasicTextConsole(self)

        self.defaultFont = self.textbox.GetFont()

        self.textbox.SetFont(wx.Font(
            self.buildSpec['terminal_font_size'] or self.defaultFont.GetPointSize(),
            self.getFontStyle(),
            wx.NORMAL,
            self.buildSpec['terminal_font_weight'] or wx.NORMAL,
            False,
            self.getFontFace(),
        ))
        self.textbox.SetForegroundColour(self.buildSpec['terminal_font_color'])
         
        self.layoutComponent()
        self.Layout()
        self.Bind(wx.EVT_TEXT_URL, self.evtUrl, self.textbox) 
开发者ID:chriskiehl,项目名称:Gooey,代码行数:28,代码来源:console.py

示例11: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NORMAL [as 别名]
def __init__(self, *args, **kw):
    super(Link, self).__init__(*args, **kw)

    self.font1 = wx.Font(11, wx.SWISS, wx.NORMAL, wx.NORMAL, True, u'微软雅黑')
    self.font2 = wx.Font(11, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'微软雅黑')

    self.SetFont(self.font2)
    self.SetForegroundColour('#0000ff')

    self.Bind(wx.EVT_MOUSE_EVENTS, self.OnMouseEvent)
    self.Bind(wx.EVT_MOTION, self.OnMouseEvent) 
开发者ID:tydesk,项目名称:tydesk,代码行数:13,代码来源:tydesk.py

示例12: _makeFonts

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NORMAL [as 别名]
def _makeFonts(self):
        self._sysFont = wx.SystemSettings.GetFont(wx.SYS_SYSTEM_FONT)
        self._labelFont = wx.Font(self._sysFont.GetPointSize(), wx.DEFAULT, wx.NORMAL, wx.BOLD)
        self._modernFont = wx.Font(self._sysFont.GetPointSize(), wx.MODERN, wx.NORMAL, wx.NORMAL)
        self._smallerFont = wx.Font(self._sysFont.GetPointSize()-2, wx.DEFAULT, wx.NORMAL, wx.NORMAL) 
开发者ID:andreas-p,项目名称:admin4,代码行数:7,代码来源:globals.py

示例13: __init__

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

示例14: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NORMAL [as 别名]
def __init__(self, *args, **kwds):
        # begin wxGlade: MessageDialog.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER
        wx.Dialog.__init__(self, *args, **kwds)
        bmp = compat.wx_ArtProvider_GetBitmap(wx.ART_TIP, wx.ART_MESSAGE_BOX, (48, 48))
        self.msg_image = wx.StaticBitmap(self, wx.ID_ANY, bmp)
        self.msg_list = wx.ListCtrl(self, wx.ID_ANY, style=wx.BORDER_SUNKEN | wx.LC_NO_HEADER | wx.LC_REPORT | wx.LC_SINGLE_SEL)
        self.OK = wx.Button(self, wx.ID_OK, "")
        # properties
        self.SetTitle(_("wxGlade Message"))
        self.msg_image.SetMinSize((48, 48))
        self.OK.SetFocus()
        self.OK.SetDefault()
        # layout
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
        sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
        msg_title = wx.StaticText(self, wx.ID_ANY, _("wxGlade Message"))
        msg_title.SetFont(wx.Font(-1, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        sizer_1.Add(msg_title, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 5)
        sizer_2.Add(self.msg_image, 0, 0, 0)
        sizer_2.Add(self.msg_list, 1, wx.EXPAND | wx.LEFT, 10)
        sizer_1.Add(sizer_2, 1, wx.EXPAND | wx.LEFT | wx.RIGHT, 5)
        sizer_1.Add(self.OK, 0, wx.ALIGN_RIGHT | wx.ALL, 10)
        self.SetSizer(sizer_1)
        self.Layout()
        self.Centre() 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:28,代码来源:msgdialog.py

示例15: __do_layout

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NORMAL [as 别名]
def __do_layout(self):
        # begin wxGlade: TemplateInfoDialog.__do_layout
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
        sizer_6 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_5 = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Instructions")), wx.HORIZONTAL)
        sizer_4 = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Description")), wx.HORIZONTAL)
        sizer_3 = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, _("Author")), wx.HORIZONTAL)
        sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
        label_template_name = wx.StaticText(self, wx.ID_ANY, _("wxGlade template: "))
        label_template_name.SetFont(wx.Font(-1, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        sizer_2.Add(label_template_name, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 10)
        sizer_2.Add(self.template_name, 1, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 10)
        sizer_1.Add(sizer_2, 0, wx.EXPAND, 0)
        sizer_3.Add(self.author, 1, 0, 0)
        sizer_1.Add(sizer_3, 0, wx.ALL | wx.EXPAND, 5)
        sizer_4.Add(self.description, 1, wx.EXPAND, 0)
        sizer_1.Add(sizer_4, 1, wx.ALL | wx.EXPAND, 5)
        sizer_5.Add(self.instructions, 1, wx.EXPAND, 0)
        sizer_1.Add(sizer_5, 1, wx.ALL | wx.EXPAND, 5)
        sizer_6.Add(self.button_1, 0, 0, 0)
        sizer_6.Add(self.button_2, 0, wx.LEFT, 10)
        sizer_1.Add(sizer_6, 0, wx.ALIGN_RIGHT | wx.ALL, 10)
        self.SetSizer(sizer_1)
        self.Layout()
        self.Centre()
        # end wxGlade

# end of class TemplateInfoDialog 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:30,代码来源:templates_ui.py


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