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


Python wx.DEFAULT属性代码示例

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


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

示例1: __init__

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

示例2: __init__

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

示例3: __set_properties

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

示例4: set_display_font_style

# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT [as 别名]
def set_display_font_style(self, style):
    # TODO: make this not stupid
    # TODO: _actual_ font support
    self.runtime_display.set_font_style(
      wx.MODERN if style == 'monospace' else wx.DEFAULT) 
开发者ID:ME-ICA,项目名称:me-ica,代码行数:7,代码来源:base_window.py

示例5: __init__

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

示例6: getFontStyle

# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT [as 别名]
def getFontStyle(self):
        """
        Force wx.Modern style to support legacy
        monospace_display param when present
        """
        return (wx.MODERN
                if self.buildSpec['monospace_display']
                else wx.DEFAULT) 
开发者ID:chriskiehl,项目名称:Gooey,代码行数:10,代码来源:console.py

示例7: _makeFonts

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

示例8: __init__

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

示例9: __do_layout

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

示例10: __set_properties

# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT [as 别名]
def __set_properties(self):
        # begin wxGlade: TemplateListDialog.__set_properties
        self.SetTitle(_("wxGlade template list"))
        self.SetSize( (600, 400) )
        self.template_name.SetFont(wx.Font(-1, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        # end wxGlade 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:8,代码来源:templates_ui.py

示例11: UpdateFont

# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT [as 别名]
def UpdateFont(self, val):
        font = eg.document.frame.treeCtrl.GetFont()
        if val:
            font = wx.Font(font.GetPointSize(), wx.DEFAULT, wx.NORMAL, wx.NORMAL, False, "Courier New")
        wx.CallAfter(eg.document.frame.logCtrl.SetFont, font) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:7,代码来源:OptionsDialog.py

示例12: GenerateMethodButtonSizer

# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT [as 别名]
def GenerateMethodButtonSizer(self):
        normal_bt_font = wx.Font(faces["size"] // 3,    wx.DEFAULT, wx.NORMAL, wx.NORMAL, faceName=faces["helv"])
        mouseover_bt_font = wx.Font(faces["size"] // 3, wx.DEFAULT, wx.NORMAL, wx.NORMAL, faceName=faces["helv"], underline=True)

        msizer = wx.BoxSizer(wx.HORIZONTAL)

        for confnode_method in self.Controler.ConfNodeMethods:
            if "method" in confnode_method and confnode_method.get("shown", True):
                button = GenBitmapTextButton(self.Editor,
                                             bitmap=GetBitmap(confnode_method.get("bitmap", "Unknown")),
                                             label=confnode_method["name"],
                                             style=wx.NO_BORDER)
                button.SetFont(normal_bt_font)
                button.SetToolTipString(confnode_method["tooltip"])
                if confnode_method.get("push", False):
                    button.Bind(wx.EVT_LEFT_DOWN, self.GetButtonCallBackFunction(confnode_method["method"], True))
                else:
                    button.Bind(wx.EVT_BUTTON, self.GetButtonCallBackFunction(confnode_method["method"]), button)
                # a fancy underline on mouseover

                def setFontStyle(b, s):
                    def fn(event):
                        b.SetFont(s)
                        b.Refresh()
                        event.Skip()
                    return fn
                button.Bind(wx.EVT_ENTER_WINDOW, setFontStyle(button, mouseover_bt_font))
                button.Bind(wx.EVT_LEAVE_WINDOW, setFontStyle(button, normal_bt_font))
                # hack to force size to mini
                if not confnode_method.get("enabled", True):
                    button.Disable()
                msizer.AddWindow(button, flag=wx.ALIGN_CENTER)
        return msizer 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:35,代码来源:ConfTreeNodeEditor.py

示例13: parseInitFile

# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT [as 别名]
def parseInitFile(f, serial, settings):
    d = [line[:-1].strip() for line in f.readlines()]
    #parse not comment starts with # and [serial] information
    a = [line for line in d if line != '' and line[0] != '[' and line[0] != '#']
    ee = [c.split('#',1)[0].strip().split('=') for c in a]
    qq = [(a[0].strip(),a[1].strip()) for a in ee]
    for name, value in qq:
        #parity='N' or'O' can not be eval()
        if name == 'parity':
            serial.parity = value
        #sometimes port = '/dev/ttyS0'
        elif name == 'port':
            try: serial.port = int(value)
            except: serial.port = value
        #font format as "fontname-pointsize" as "Courier 10 Pitch-10"
        elif name == 'font':
            x,y = value.split('-')
            #utf-8 is always our choice :D
            try:
                settings.font = wx.Font(eval(y), wx.DEFAULT, wx.NORMAL, wx.NORMAL, False, x)
            except UnicodeDecodeError:
                settings.font = wx.Font(eval(y), wx.DEFAULT, wx.NORMAL, wx.NORMAL, False, x.decode('utf-8'))
        #for other attrs, we just set there attr by setattr and got their value by eval()
        else:
            if hasattr(serial, name):
                setattr(serial,name, eval(value))
            else:
                setattr(settings,name, eval(value)) 
开发者ID:nccgroup,项目名称:Zulu,代码行数:30,代码来源:easyshell.py

示例14: __parse_initial

# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT [as 别名]
def __parse_initial(self):


	path = self.outputwin.workingdir

        try:
            f = open(path + '/serial_init.txt', 'r')
            parseInitFile(f, self.serial, self.settings)
            f.close()
        #if load init file fails, we reload the defaults
        except Exception, e:
            print e
            self.serial.port = S_PORT
            self.serial.baudrate = S_BAUDRATE
            self.serial.bytesize = S_BYTESIZE
            self.serial.stopbits = S_STOPBITS
            self.serial.parity = S_PARITY
            self.serial.rtscts = S_RTSCTS
            self.serial.xonxoff = S_XONXOFF
            self.settings.echo = D_ECHO
            self.settings.newline = D_NEWLINE
            self.settings.unprintable = D_UNPRINTABLE
            self.settings.forecolor = D_FOREGROUND_COLOR
            self.settings.backcolor = D_BACKGROUND_COLOR
            self.settings.font = wx.Font(13, wx.DEFAULT, wx.NORMAL,
                                         wx.NORMAL, False, u'Courier 10 Pitch')
	    self.outputwin.ser = self.serial 
开发者ID:nccgroup,项目名称:Zulu,代码行数:29,代码来源:easyshell.py

示例15: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import DEFAULT [as 别名]
def __init__(self, parent, fontsize, maximum, title, formatting_string, vertical=False):
        wx.Frame.__init__(self, parent, style=wx.NO_BORDER)

        if isinstance(maximum, list):
            self.list_maximum = maximum
            self.list_title = title
            self.list_formatting_string = formatting_string
        else:
            self.list_maximum = [maximum]
            self.list_title = [title]
            self.list_formatting_string = [formatting_string]

        self.labels = []
        self.titles = []
        self.gauges = []
        self.sizer = wx.GridBagSizer(5, 5)
        for i in range(len(self.list_maximum)):
            if vertical:
                if title:
                    self.titles.append(wx.StaticText(self, label=self.list_title[i] + ':', style=wx.ALIGN_LEFT))
                self.labels.append(wx.StaticText(self, style=wx.ALIGN_RIGHT))
                self.gauges.append(wx.Gauge(self, range=self.list_maximum[i]))
            else:
                if title:
                    self.titles.append(wx.StaticText(self, label=self.list_title[i], style=wx.ALIGN_CENTER))
                self.labels.append(wx.StaticText(self, style=wx.ALIGN_CENTRE_HORIZONTAL))
                self.gauges.append(wx.Gauge(self, range=self.list_maximum[i], style=wx.GA_VERTICAL))
            font = wx.Font(fontsize, wx.DEFAULT, wx.NORMAL, wx.BOLD)
            self.labels[i].SetFont(font)
            if title:
                self.titles[i].SetFont(font)
            if vertical:
                if title:
                    self.sizer.Add(self.titles[i], pos=(i, 0), flag=wx.ALL|wx.ALIGN_BOTTOM)
                self.sizer.Add(self.gauges[i], pos=(i, 1), flag=wx.ALL|wx.EXPAND)
                self.sizer.Add(self.labels[i], pos=(i, 2), flag=wx.ALL|wx.ALIGN_BOTTOM)
            else:
                if title:
                    self.sizer.Add(self.titles[i], pos=(0, i), flag=wx.ALL|wx.ALIGN_CENTER)
                extra = wx.BoxSizer(wx.HORIZONTAL)
                extra.AddStretchSpacer()
                extra.Add(self.gauges[i], flag=wx.EXPAND)
                extra.AddStretchSpacer()
                self.sizer.Add(extra, pos=(1, i), flag=wx.ALL|wx.EXPAND)
                self.sizer.Add(self.labels[i], pos=(2, i), flag=wx.ALL|wx.ALIGN_CENTER)
                self.sizer.AddGrowableCol(i, 0)
        if vertical:
            self.sizer.AddGrowableCol(1, 1)
        else:
            self.sizer.AddGrowableRow(1)
        self.SetSizer(self.sizer)
        self.sizer.Fit(self) 
开发者ID:tangible-landscape,项目名称:grass-tangible-landscape,代码行数:54,代码来源:activities_dashboard.py


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