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


Python wx.StaticText方法代码示例

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


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

示例1: addCombo

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticText [as 别名]
def addCombo(self, name, descr, parent, sizer, items, sel):
        al = wx.ALIGN_CENTER_VERTICAL | wx.RIGHT
        if sel == 1:
            al |= wx.ALIGN_RIGHT

        sizer.Add(wx.StaticText(parent, -1, descr), 0, al, 10)

        combo = wx.ComboBox(parent, -1, style = wx.CB_READONLY)
        util.setWH(combo, w = 200)

        for s in items:
            combo.Append(s)

        combo.SetSelection(sel)

        sizer.Add(combo)

        setattr(self, name + "Combo", combo) 
开发者ID:trelby,项目名称:trelby,代码行数:20,代码来源:misc.py

示例2: addMarginCtrl

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticText [as 别名]
def addMarginCtrl(self, name, parent, sizer):
        sizer.Add(wx.StaticText(parent, -1, name + ":"), 0,
                  wx.ALIGN_CENTER_VERTICAL)

        entry = wx.TextCtrl(parent, -1)
        sizer.Add(entry, 0)
        label = wx.StaticText(parent, -1, "mm")
        sizer.Add(label, 0, wx.ALIGN_CENTER_VERTICAL)

        entry2 = wx.TextCtrl(parent, -1)
        sizer.Add(entry2, 0, wx.LEFT, 20)
        label2 = wx.StaticText(parent, -1, "inch")
        sizer.Add(label2, 0, wx.ALIGN_CENTER_VERTICAL)

        setattr(self, name.lower() + "EntryMm", entry)
        setattr(self, name.lower() + "EntryInch", entry2)

        wx.EVT_TEXT(self, entry.GetId(), self.OnMarginMm)
        wx.EVT_TEXT(self, entry2.GetId(), self.OnMarginInch) 
开发者ID:trelby,项目名称:trelby,代码行数:21,代码来源:cfgdlg.py

示例3: createControls

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticText [as 别名]
def createControls(self):
        self.flagOptionsLabel = wx.StaticText(self, label="Flagging methods:")
        self.flagOutlierButton = wx.Button(self,-1,"Flag Outlier",size=(160,30))
        self.flagRangeButton = wx.Button(self,-1,"Flag Range",size=(160,30))
        self.flagMinButton = wx.Button(self,-1,"Flag Minimum",size=(160,30))
        self.flagMaxButton = wx.Button(self,-1,"Flag Maximum",size=(160,30))
        self.xCheckBox = wx.CheckBox(self,label="X             ")
        self.yCheckBox = wx.CheckBox(self,label="Y             ")
        self.zCheckBox = wx.CheckBox(self,label="Z             ")
        self.fCheckBox = wx.CheckBox(self,label="F             ")
        self.FlagIDText = wx.StaticText(self,label="Select Min/Max Flag ID:")
        self.FlagIDComboBox = wx.ComboBox(self, choices=self.flagidlist,
            style=wx.CB_DROPDOWN, value=self.flagidlist[3],size=(160,-1))
        self.flagSelectionButton = wx.Button(self,-1,"Flag Selection",size=(160,30))
        self.flagDropButton = wx.Button(self,-1,"Drop flagged",size=(160,30))
        self.flagLoadButton = wx.Button(self,-1,"Load flags",size=(160,30))
        self.flagSaveButton = wx.Button(self,-1,"Save flags",size=(160,30))
        self.flagClearButton = wx.Button(self,-1,"Clear flags",size=(160,30)) 
开发者ID:geomagpy,项目名称:magpy,代码行数:20,代码来源:flagpage.py

示例4: createControls

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticText [as 别名]
def createControls(self):
        self.DrawAuxButton = wx.Button(self,-1,"Draw/Recalc")
        self.SaveAuxButton = wx.Button(self,-1,"Save data")
        self.AppendAuxButton = wx.Button(self,-1,"Append")
        self.OpenAuxButton = wx.Button(self,-1,"Open Aux file")
        self.AuxDataLabel = wx.StaticText(self, label="Auxiliary data")
        self.AuxDataTextCtrl = wx.TextCtrl(self, style=wx.TE_MULTILINE) # get this value from obsini
        self.AuxDataTextCtrl.Disable()
        self.AuxResolutionLabel = wx.StaticText(self, label="Time resolution")
        self.AuxResolutionTextCtrl = wx.TextCtrl(self, value="NaN")
        self.AuxResolutionTextCtrl.Disable()
        self.AuxStartDateTextCtrl = wx.TextCtrl(self, value="--")
        self.AuxStartDateTextCtrl.Disable()
        self.AuxEndDateTextCtrl = wx.TextCtrl(self, value="--")
        self.AuxEndDateTextCtrl.Disable()
        self.funcLabel = wx.StaticText(self, label="Apply fuctions:")
        self.removeOutliersCheckBox = wx.CheckBox(self,
            label="Remove Outliers")
        self.recoveryCheckBox = wx.CheckBox(self,
            label="Show data coverage")
        self.interpolateCheckBox = wx.CheckBox(self,
            label="Interpolate data")
        self.fitCheckBox = wx.CheckBox(self,
            label="Fit function") 
开发者ID:geomagpy,项目名称:magpy,代码行数:26,代码来源:developpage.py

示例5: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticText [as 别名]
def __init__(self):
        wx.Frame.__init__(self, None,
                          pos=wx.DefaultPosition, size=wx.Size(450, 100),
                          style=wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.CAPTION |
                          wx.CLOSE_BOX | wx.CLIP_CHILDREN,
                          title="BRUNO")
        panel = wx.Panel(self)

        ico = wx.Icon('boy.ico', wx.BITMAP_TYPE_ICO)
        self.SetIcon(ico)

        my_sizer = wx.BoxSizer(wx.VERTICAL)
        lbl = wx.StaticText(panel,
                            label="Bienvenido Sir. How can I help you?")
        my_sizer.Add(lbl, 0, wx.ALL, 5)
        self.txt = wx.TextCtrl(panel, style=wx.TE_PROCESS_ENTER,
                               size=(400, 30))
        self.txt.SetFocus()
        self.txt.Bind(wx.EVT_TEXT_ENTER, self.OnEnter)
        my_sizer.Add(self.txt, 0, wx.ALL, 5)
        panel.SetSizer(my_sizer)
        self.Show()
        speak.Speak('''Welcome back Sir, Broono at your service.''') 
开发者ID:ab-anand,项目名称:Bruno,代码行数:25,代码来源:daily.py

示例6: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticText [as 别名]
def __init__(self, parent=None, id=wx.ID_ANY):
		super().__init__(parent, id)
		sizer = wx.BoxSizer(wx.HORIZONTAL)
		# Translators: The label of an edit field in connect dialog to enter name or address of the remote computer.
		sizer.Add(wx.StaticText(self, wx.ID_ANY, label=_("&Host:")))
		self.host = wx.TextCtrl(self, wx.ID_ANY)
		sizer.Add(self.host)
		# Translators: Label of the edit field to enter key (password) to secure the remote connection.
		sizer.Add(wx.StaticText(self, wx.ID_ANY, label=_("&Key:")))
		self.key = wx.TextCtrl(self, wx.ID_ANY)
		sizer.Add(self.key)
		# Translators: The button used to generate a random key/password.
		self.generate_key = wx.Button(parent=self, label=_("&Generate Key"))
		self.generate_key.Bind(wx.EVT_BUTTON, self.on_generate_key)
		sizer.Add(self.generate_key)
		self.SetSizerAndFit(sizer) 
开发者ID:NVDARemote,项目名称:NVDARemote,代码行数:18,代码来源:dialogs.py

示例7: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticText [as 别名]
def __init__(self, parent, help_entries):
        wx.Dialog.__init__(self, parent, title="Help",
                           style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)

        sizer = wx.BoxSizer(wx.VERTICAL)
        grid_sizer = wx.FlexGridSizer(0, 3, 8, 6)
        # create and add the entries
        bold = self.GetFont().MakeBold()
        for r, row in enumerate(self.headers + help_entries):
            for (col, width) in zip(row, self.widths):
                label = wx.StaticText(self, label=col)
                if r == 0:
                    label.SetFont(bold)
                label.Wrap(width)
                grid_sizer.Add(label, 0, 0, 0)
        # finalize layout, create button
        sizer.Add(grid_sizer, 0, wx.ALL, 6)
        OK = wx.Button(self, wx.ID_OK)
        sizer.Add(OK, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 8)
        self.SetSizer(sizer)
        sizer.Fit(self)
        self.Layout()
        self.Bind(wx.EVT_CLOSE, self.OnClose)
        OK.Bind(wx.EVT_BUTTON, self.OnClose) 
开发者ID:PacktPublishing,项目名称:Mastering-Elasticsearch-7.0,代码行数:26,代码来源:backend_wx.py

示例8: addStaticBoxWithLabels

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticText [as 别名]
def addStaticBoxWithLabels(self):
        boxSizerH = wx.BoxSizer(wx.HORIZONTAL)
        staticBox = wx.StaticBox( self.panel, -1, "Labels within a Frame" )
        staticBoxSizerV = wx.StaticBoxSizer( staticBox, wx.VERTICAL )
        boxSizerV = wx.BoxSizer( wx.VERTICAL )
        staticText1 = wx.StaticText( self.panel, -1, " Choose a number:" )
        boxSizerV.Add( staticText1, 0, wx.ALL)
        staticText2 = wx.StaticText( self.panel, -1, "           Label 2")
        boxSizerV.Add( staticText2, 0, wx.ALL )
        #------------------------------------------------------
        staticBoxSizerV.Add( boxSizerV, 0, wx.ALL )
        boxSizerH.Add(staticBoxSizerV)
        #------------------------------------------------------
        boxSizerH.Add(wx.ComboBox(self.panel, size=(70, -1)))
        #------------------------------------------------------
        boxSizerH.Add(wx.SpinCtrl(self.panel, size=(50, -1), style=wx.BORDER_RAISED))             
        
        # Add local boxSizer to main frame
        self.statBoxSizerV.Add( boxSizerH, 1, wx.ALL )

    #---------------------------------------------------------- 
开发者ID:PacktPublishing,项目名称:Python-GUI-Programming-Cookbook-Second-Edition,代码行数:23,代码来源:GUI_wxPython.py

示例9: on_option_tab_create

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticText [as 别名]
def on_option_tab_create(self, notebook):
        self.panel = wx.Panel(notebook, wx.ID_ANY)
        self.panel_name = _('WebSocket Server')
        self.layout = wx.BoxSizer(wx.VERTICAL)

        self.check_enable = wx.CheckBox(
            self.panel, wx.ID_ANY, _('Enable WebSocket Server'))
        self.edit_port = wx.TextCtrl(self.panel, wx.ID_ANY, 'port')

        layout = wx.GridSizer(2)
        layout.Add(wx.StaticText(self.panel, wx.ID_ANY, _('Listen port')))
        layout.Add(self.edit_port)

        self.layout.Add(self.check_enable)
        self.layout.Add(wx.StaticText(
            self.panel, wx.ID_ANY,
            _('WARNING: The server is accessible by anyone.'),
        ))
        self.layout.Add(layout, flag=wx.EXPAND)

        self.panel.SetSizer(self.layout) 
开发者ID:hasegaw,项目名称:IkaLog,代码行数:23,代码来源:websocket_server.py

示例10: on_option_tab_create

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticText [as 别名]
def on_option_tab_create(self, notebook):
        self.panel = wx.Panel(notebook, wx.ID_ANY, size=(640, 360))
        self.panel_name = 'Hue'
        self.layout = wx.BoxSizer(wx.VERTICAL)
        self.panel.SetSizer(self.layout)
        self.checkEnable = wx.CheckBox(self.panel, wx.ID_ANY, u'Hue と連携')
        self.editHueHost = wx.TextCtrl(self.panel, wx.ID_ANY, u'hoge')
        self.editHueUsername = wx.TextCtrl(self.panel, wx.ID_ANY, u'hoge')

        try:
            layout = wx.GridSizer(2, 2)
        except:
            layout = wx.GridSizer(2)

        layout.Add(wx.StaticText(self.panel, wx.ID_ANY, u'ホスト'))
        layout.Add(self.editHueHost)
        layout.Add(wx.StaticText(self.panel, wx.ID_ANY, u'ユーザ'))
        layout.Add(self.editHueUsername)
        self.layout.Add(self.checkEnable)
        self.layout.Add(layout)

    # enhance_color and rgb2xy is imported from:
    # https://gist.githubusercontent.com/error454/6b94c46d1f7512ffe5ee/raw/73b190ce256c3d8dd540cc34e6dae43848cbce4c/gistfile1.py

    # All the rights belongs to the author. 
开发者ID:hasegaw,项目名称:IkaLog,代码行数:27,代码来源:hue.py

示例11: on_option_tab_create

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticText [as 别名]
def on_option_tab_create(self, notebook):
        self.panel = wx.Panel(notebook, wx.ID_ANY)
        self.panel_name = _('CSV')
        self.layout = wx.BoxSizer(wx.VERTICAL)
        self.panel.SetSizer(self.layout)
        self.checkEnable = wx.CheckBox(
            self.panel, wx.ID_ANY, _('Enable CSV Log'))
        self.editCsvFilename = wx.TextCtrl(self.panel, wx.ID_ANY, u'hoge')

        self.layout.Add(wx.StaticText(self.panel, wx.ID_ANY, _('Log Filename')))
        self.layout.Add(self.editCsvFilename, flag=wx.EXPAND)

        self.layout.Add(self.checkEnable)

    ##
    # Write a line to text file.
    # @param self     The Object Pointer.
    # @param record   Record (text)
    # 
开发者ID:hasegaw,项目名称:IkaLog,代码行数:21,代码来源:csv.py

示例12: on_option_tab_create

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticText [as 别名]
def on_option_tab_create(self, notebook):
        self.panel = wx.Panel(notebook, wx.ID_ANY)
        self.panel_name = _('Screenshot')
        self.layout = wx.BoxSizer(wx.VERTICAL)
        self.panel.SetSizer(self.layout)
        self.checkResultDetailEnable = wx.CheckBox(
            self.panel, wx.ID_ANY, _('Save screenshots of game results'))
        self.editDir = wx.TextCtrl(self.panel, wx.ID_ANY, u'hoge')

        self.layout.Add(wx.StaticText(
            self.panel, wx.ID_ANY, _('Folder to save screenshots')))
        self.layout.Add(self.editDir, flag=wx.EXPAND)
        self.layout.Add(self.checkResultDetailEnable)

        self.panel.SetSizer(self.layout)

    ##
    # on_result_detail_still Hook
    # @param self      The Object Pointer
    # @param context   IkaLog context
    # 
开发者ID:hasegaw,项目名称:IkaLog,代码行数:23,代码来源:screenshot.py

示例13: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticText [as 别名]
def __init__(self, parent, label, param):
        self.sliderLabel = wx.StaticText(parent, label=label)
        self.sliderText = wx.TextCtrl(parent, -1, style=wx.TE_PROCESS_ENTER)
        self.slider = wx.Slider(parent, -1)
        # self.slider.SetMax(param.maximum*1000)
        self.slider.SetRange(0, param.maximum * 1000)
        self.setKnob(param.value)

        sizer = wx.BoxSizer(wx.HORIZONTAL)
        sizer.Add(self.sliderLabel, 0,
                  wx.EXPAND | wx.ALIGN_CENTER | wx.ALL,
                  border=2)
        sizer.Add(self.sliderText, 0,
                  wx.EXPAND | wx.ALIGN_CENTER | wx.ALL,
                  border=2)
        sizer.Add(self.slider, 1, wx.EXPAND)
        self.sizer = sizer

        self.slider.Bind(wx.EVT_SLIDER, self.sliderHandler)
        self.sliderText.Bind(wx.EVT_TEXT_ENTER, self.sliderTextHandler)

        self.param = param
        self.param.attach(self) 
开发者ID:holzschu,项目名称:python3_ios,代码行数:25,代码来源:fourier_demo_wx_sgskip.py

示例14: get_summary_widgets

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticText [as 别名]
def get_summary_widgets(self, summary_panel):
        """Return a list of summary widgets suitable for sizer.AddMany."""
        self.summary_panel = summary_panel
        self.summary_name = wx.StaticText(summary_panel, -1, self.name)
        self.summary_name.Bind(wx.EVT_LEFT_UP, self.show_this_panel)

        self.summary_status = wx.StaticText(summary_panel, -1, STR_STOPPED)
        self.summary_shares_accepted = wx.StaticText(summary_panel, -1, "0")
        self.summary_shares_invalid = wx.StaticText(summary_panel, -1, "0")
        self.summary_start = wx.Button(summary_panel, -1, self.get_start_stop_state(), style=wx.BU_EXACTFIT)
        self.summary_start.Bind(wx.EVT_BUTTON, self.toggle_mining)
        self.summary_autostart = wx.CheckBox(summary_panel, -1)
        self.summary_autostart.Bind(wx.EVT_CHECKBOX, self.toggle_autostart)
        self.summary_autostart.SetValue(self.autostart)
        return [
            (self.summary_name, 0, wx.ALIGN_CENTER_HORIZONTAL),
            (self.summary_status, 0, wx.ALIGN_CENTER_HORIZONTAL, 0),
            (self.summary_shares_accepted, 0, wx.ALIGN_CENTER_HORIZONTAL, 0),
            (self.summary_shares_invalid, 0, wx.ALIGN_CENTER_HORIZONTAL, 0),
            (self.summary_start, 0, wx.ALIGN_CENTER, 0),
            (self.summary_autostart, 0, wx.ALIGN_CENTER, 0)
        ] 
开发者ID:theRealTacoTime,项目名称:poclbm,代码行数:24,代码来源:guiminer.py

示例15: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StaticText [as 别名]
def __init__(self, parent, title, current_language):
        style = wx.DEFAULT_DIALOG_STYLE
        vbox = wx.BoxSizer(wx.VERTICAL)
        wx.Dialog.__init__(self, parent, -1, title, style=style)
        self.lbl = wx.StaticText(self, -1,
            _("Choose language (requires restart to take full effect)"))
        vbox.Add(self.lbl, 0, wx.ALL, 10)
        self.language_choices = wx.ComboBox(self, -1,
                                            choices=sorted(LANGUAGES.keys()),
                                            style=wx.CB_READONLY)

        self.language_choices.SetStringSelection(LANGUAGES_REVERSE[current_language])

        vbox.Add(self.language_choices, 0, wx.ALL, 10)
        buttons = self.CreateButtonSizer(wx.OK | wx.CANCEL)
        vbox.Add(buttons, 0, wx.ALL | wx.ALIGN_CENTER_HORIZONTAL, 10)
        self.SetSizerAndFit(vbox) 
开发者ID:theRealTacoTime,项目名称:poclbm,代码行数:19,代码来源:guiminer.py


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