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


Python wx.ALIGN_CENTER_VERTICAL属性代码示例

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


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

示例1: build

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_CENTER_VERTICAL [as 别名]
def build(self, parent, data, choices=None):
    self.parent = parent
    self.widget = wx.TextCtrl(self.parent)
    self.widget.AppendText('')
    self.widget.SetMinSize((0, -1))
    dt = FileDrop(self.widget)
    self.widget.SetDropTarget(dt)
    self.button = wx.Button(self.parent, label=self.button_text, size=(73, 23))

    widget_sizer = wx.BoxSizer(wx.HORIZONTAL)
    widget_sizer.Add(self.widget, 1, wx.EXPAND)
    widget_sizer.AddSpacer(10)
    widget_sizer.Add(self.button, 0, wx.ALIGN_CENTER_VERTICAL)

    parent.Bind(wx.EVT_BUTTON, self.on_button, self.button)

    return widget_sizer 
开发者ID:ME-ICA,项目名称:me-ica,代码行数:19,代码来源:widget_pack.py

示例2: addCombo

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

示例3: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_CENTER_VERTICAL [as 别名]
def __init__(self, parent, title):
        style = wx.DEFAULT_DIALOG_STYLE
        vbox = wx.BoxSizer(wx.VERTICAL)
        wx.Dialog.__init__(self, parent, -1, title, style=style)
        self.user_lbl = wx.StaticText(self, -1, STR_USERNAME)
        self.txt_username = wx.TextCtrl(self, -1, "")
        self.pass_lbl = wx.StaticText(self, -1, STR_PASSWORD)
        self.txt_pass = wx.TextCtrl(self, -1, "", style=wx.TE_PASSWORD)
        grid_sizer_1 = wx.FlexGridSizer(2, 2, 5, 5)
        grid_sizer_1.Add(self.user_lbl, 0, wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL, 0)
        grid_sizer_1.Add(self.txt_username, 0, wx.EXPAND, 0)
        grid_sizer_1.Add(self.pass_lbl, 0, wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL, 0)
        grid_sizer_1.Add(self.txt_pass, 0, wx.EXPAND, 0)
        buttons = self.CreateButtonSizer(wx.OK | wx.CANCEL)
        vbox.Add(grid_sizer_1, wx.EXPAND | wx.ALL, 10)
        vbox.Add(buttons)
        self.SetSizerAndFit(vbox) 
开发者ID:theRealTacoTime,项目名称:poclbm,代码行数:19,代码来源:guiminer.py

示例4: _do_layout

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_CENTER_VERTICAL [as 别名]
def _do_layout(self):
    self.stop_button.Hide()
    self.restart_button.Hide()

    v_sizer = wx.BoxSizer(wx.VERTICAL)
    h_sizer = wx.BoxSizer(wx.HORIZONTAL)

    h_sizer.AddStretchSpacer(1)
    h_sizer.Add(self.cancel_button, 0, wx.ALIGN_RIGHT | wx.RIGHT, 20)
    h_sizer.Add(self.start_button, 0, wx.ALIGN_RIGHT | wx.RIGHT, 20)

    v_sizer.AddStretchSpacer(1)
    v_sizer.Add(h_sizer, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND)
    v_sizer.Add(self.running_animation, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT | wx.RIGHT, 20)
    self.running_animation.Hide()

    h_sizer.Add(self.edit_button, 0, wx.ALIGN_RIGHT | wx.RIGHT, 10)
    h_sizer.Add(self.restart_button, 0, wx.ALIGN_RIGHT | wx.RIGHT, 10)
    h_sizer.Add(self.close_button, 0, wx.ALIGN_RIGHT | wx.RIGHT, 20)
    self.edit_button.Hide()
    self.restart_button.Hide()
    self.close_button.Hide()

    v_sizer.AddStretchSpacer(1)
    self.SetSizer(v_sizer) 
开发者ID:lrq3000,项目名称:pyFileFixity,代码行数:27,代码来源:footer.py

示例5: _set_layout

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_CENTER_VERTICAL [as 别名]
def _set_layout(self):
        main_sizer = wx.BoxSizer(wx.HORIZONTAL)
        vertical_sizer = wx.BoxSizer(wx.VERTICAL)

        vertical_sizer.Add(self.video_formats_label)
        vertical_sizer.Add(self.video_formats_checklistbox, 1, wx.EXPAND | wx.ALL, border=5)

        vertical_sizer.Add(self.audio_formats_label, flag=wx.TOP, border=5)
        vertical_sizer.Add(self.audio_formats_checklistbox, 1, wx.EXPAND | wx.ALL, border=5)

        vertical_sizer.Add(self.post_proc_opts_label, flag=wx.TOP, border=5)
        vertical_sizer.Add(self.keep_video_checkbox, flag=wx.ALL, border=5)
        vertical_sizer.Add(self.extract_audio_checkbox, flag=wx.LEFT | wx.RIGHT | wx.BOTTOM, border=5)
        vertical_sizer.Add(self.embed_thumbnail_checkbox, flag=wx.LEFT | wx.RIGHT | wx.BOTTOM, border=5)
        vertical_sizer.Add(self.add_metadata_checkbox, flag=wx.LEFT | wx.RIGHT | wx.BOTTOM, border=5)

        audio_quality_sizer = wx.BoxSizer(wx.HORIZONTAL)
        audio_quality_sizer.Add(self.audio_quality_label, flag=wx.ALIGN_CENTER_VERTICAL)
        audio_quality_sizer.AddSpacer((20, -1))
        audio_quality_sizer.Add(self.audio_quality_combobox)

        vertical_sizer.Add(audio_quality_sizer, flag=wx.LEFT | wx.RIGHT | wx.BOTTOM, border=5)

        main_sizer.Add(vertical_sizer, 1, wx.EXPAND | wx.ALL, border=5)
        self.SetSizer(main_sizer) 
开发者ID:MrS0m30n3,项目名称:youtube-dl-gui,代码行数:27,代码来源:optionsframe.py

示例6: _build_playlist_sizer

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_CENTER_VERTICAL [as 别名]
def _build_playlist_sizer(self):
        playlist_box_sizer = wx.StaticBoxSizer(self.playlist_box, wx.VERTICAL)
        playlist_box_sizer.AddSpacer((-1, 10))

        border = wx.GridBagSizer(5, 40)

        border.Add(self.playlist_start_label, (0, 0), flag=wx.ALIGN_CENTER_VERTICAL)
        border.Add(self.playlist_start_spinctrl, (0, 1))

        border.Add(self.playlist_stop_label, (1, 0), flag=wx.ALIGN_CENTER_VERTICAL)
        border.Add(self.playlist_stop_spinctrl, (1, 1))

        border.Add(self.playlist_max_label, (2, 0), flag=wx.ALIGN_CENTER_VERTICAL)
        border.Add(self.playlist_max_spinctrl, (2, 1))

        playlist_box_sizer.Add(border, flag=wx.ALIGN_CENTER)

        return playlist_box_sizer 
开发者ID:MrS0m30n3,项目名称:youtube-dl-gui,代码行数:20,代码来源:optionsframe.py

示例7: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_CENTER_VERTICAL [as 别名]
def __init__(self, parent, label, xxx):
        ParamPage.__init__(self, parent, xxx)
        box = wx.StaticBox(self, -1, label)
        box.SetFont(g.labelFont())
        topSizer = wx.StaticBoxSizer(box, wx.VERTICAL)
        sizer = wx.FlexGridSizer(len(xxx.styles), 2, 0, 1)
        sizer.AddGrowableCol(1)
        for param in xxx.styles:
            present = xxx.params.has_key(param)
            check = wx.CheckBox(self, paramIDs[param],
                               param + ':', size = (LABEL_WIDTH,-1), name = param)
            check.SetValue(present)
            control = paramDict[param](self, name = param)
            control.Enable(present)
            sizer.AddMany([ (check, 0, wx.ALIGN_CENTER_VERTICAL),
                            (control, 0, wx.ALIGN_CENTER_VERTICAL | wx.GROW) ])
            self.checks[param] = check
            self.controls[param] = control
        topSizer.Add(sizer, 1, wx.ALL | wx.EXPAND, 3)
        self.SetAutoLayout(True)
        self.SetSizer(topSizer)
        topSizer.Fit(self)
    # Set data for a cahced page 
开发者ID:andreas-p,项目名称:admin4,代码行数:25,代码来源:panel.py

示例8: create_editor

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_CENTER_VERTICAL [as 别名]
def create_editor(self, panel, sizer):
        label_text = self._find_label()
        self.checkbox = wx.CheckBox(panel, -1, '', name=label_text)
        self._display_value()
        self.label_ctrl = label = self._get_label(label_text, panel, name=label_text)

        if config.preferences.use_checkboxes_workaround:
            size = self.checkbox.GetSize()
            self.checkbox.SetLabel(label_text)
            self.checkbox.SetMaxSize(size)

        hsizer = wx.BoxSizer(wx.HORIZONTAL)
        #hsizer.Add(label, 2, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 3)
        hsizer.Add(label, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 3)
        #hsizer.SetItemMinSize(0, config.label_initial_width, -1)
        #hsizer.AddSpacer(20)
        hsizer.Add(self.checkbox, 0, wx.ALIGN_LEFT | wx.ALL, 3)
        hsizer.AddStretchSpacer(5)
        sizer.Add(hsizer, 0, wx.EXPAND)
        self._set_tooltip(label, self.checkbox)
        self.checkbox.Bind(wx.EVT_CHECKBOX, self.on_change_val)
        self.editing = True 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:24,代码来源:new_properties.py

示例9: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_CENTER_VERTICAL [as 别名]
def __init__(self, parent, label, title, mesg, treeLink=None):
        if treeLink is None:
            treeLink = eg.TreeLink(eg.Utils.GetTopLevelWindow(parent).treeItem)
        self.treeLink = treeLink
        self.macro = treeLink.target
        if self.macro is None:
            macroName = ""
        else:
            macroName = self.macro.name
        self.title = title
        self.mesg = mesg
        wx.Window.__init__(self, parent, -1)
        self.textBox = eg.StaticTextBox(self, -1, macroName, size=(200, -1))
        self.button = wx.Button(self, -1, label)
        self.Bind(wx.EVT_BUTTON, self.OnButton)
        sizer = wx.BoxSizer(wx.HORIZONTAL)
        sizer.Add(self.textBox, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL)
        sizer.Add(self.button, 0, wx.LEFT, 5)
        self.SetSizer(sizer)
        self.Bind(wx.EVT_SIZE, self.OnSize)
        self.Bind(wx.EVT_SET_FOCUS, self.OnSetFocus)
        self.Layout() 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:24,代码来源:MacroSelectButton.py

示例10: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_CENTER_VERTICAL [as 别名]
def __init__(self, parent, label, title="", mesg="", imageString=None):
        self.title = title
        self.mesg = mesg
        self.imageString = imageString
        wx.Window.__init__(self, parent, -1)
        self.button = wx.Button(self, -1, label)
        self.imageBox = wx.StaticBitmap(
            self, -1, size=(10, 10), style=wx.SUNKEN_BORDER
        )
        self.SetValue(imageString)
        sizer = wx.BoxSizer(wx.HORIZONTAL)
        sizer.Add(self.button, 0, wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, 5)
        sizer.Add(self.imageBox, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL)
        self.SetSizer(sizer)
        self.Bind(wx.EVT_BUTTON, self.OnButton)
        self.Bind(wx.EVT_SIZE, self.OnSize)
        self.Bind(wx.EVT_SET_FOCUS, self.OnSetFocus)
        self.Layout() 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:20,代码来源:ImagePicker.py

示例11: Add

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_CENTER_VERTICAL [as 别名]
def Add(
        self,
        ctrl,
        proportion=0,
        flags=wx.ALIGN_CENTER_VERTICAL | wx.RIGHT,
        border=5
    ):
        if self.numSpecialCtrls == 0:
            self.sizer.Insert(0, (15, 5))
        self.sizer.Insert(
            self.numSpecialCtrls + 1,
            ctrl,
            proportion,
            flags,
            border
        )
        self.numSpecialCtrls += 1 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:19,代码来源:ButtonRow.py

示例12: AddGrid

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_CENTER_VERTICAL [as 别名]
def AddGrid(self, grid, vgap=6, hgap=5):
        columns = self.maxRowNum
        sizer = wx.GridBagSizer(vgap, hgap)
        sizer.SetFlexibleDirection(wx.HORIZONTAL)
        rowFlagsGet = self.rowFlags.get
        colFlagsGet = self.colFlags.get
        for rowNum, (row, kwargs) in enumerate(grid):
            if kwargs.get("growable", False):
                sizer.AddGrowableRow(rowNum)
            for colNum, ctrl in enumerate(row):
                if ctrl is None:
                    ctrl = (1, 1)
                elif type(ctrl) in types.StringTypes:
                    ctrl = wx.StaticText(self, -1, ctrl)

                flags = rowFlagsGet(rowNum, 0) | colFlagsGet(colNum, 0)
                flags |= (wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_LEFT)
                sizer.Add(ctrl, (rowNum, colNum), (1, 1), flags)

            if colNum < columns - 1:
                sizer.SetItemSpan(ctrl, (1, columns - colNum + 1))
        self.sizer.Add(sizer, 1, wx.EXPAND) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:24,代码来源:ConfigPanel.py

示例13: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_CENTER_VERTICAL [as 别名]
def __init__(self, parent, label, title, mesg, treeLink=None):
        if treeLink is None:
            treeLink = eg.TreeLink(eg.Utils.GetTopLevelWindow(parent).treeItem)
        self.treeLink = treeLink
        self.action = treeLink.target
        if self.action is None:
            actionName = ""
        else:
            actionName = self.action.GetLabel()
        self.title = title
        self.mesg = mesg
        wx.Window.__init__(self, parent, -1)
        self.textBox = eg.StaticTextBox(self, -1, actionName, size=(200, -1))
        self.button = wx.Button(self, -1, label)
        self.Bind(wx.EVT_BUTTON, self.OnButton)
        sizer = wx.BoxSizer(wx.HORIZONTAL)
        sizer.Add(self.textBox, 1, wx.EXPAND | wx.ALIGN_CENTER_VERTICAL)
        sizer.Add(self.button, 0, wx.LEFT, 5)
        self.SetSizer(sizer)
        self.Bind(wx.EVT_SIZE, self.OnSize)
        self.Bind(wx.EVT_SET_FOCUS, self.OnSetFocus)
        self.Layout() 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:24,代码来源:ActionSelectButton.py

示例14: Configure

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_CENTER_VERTICAL [as 别名]
def Configure(self, interval=0.5, link=None):
        panel = eg.ConfigPanel()
        text = self.text
        intervalCtrl = panel.SpinNumCtrl(interval)
        macroCtrl = eg.MacroSelectButton(
            panel,
            eg.text.General.choose,
            text.text4,
            text.text5,
            link
        )

        sizer1 = eg.HBoxSizer(
            (panel.StaticText(text.text1), 0, wx.ALIGN_CENTER_VERTICAL),
            (intervalCtrl, 0, wx.LEFT | wx.RIGHT, 5),
            (panel.StaticText(text.text2), 0, wx.ALIGN_CENTER_VERTICAL),
        )
        mySizer = wx.FlexGridSizer(2, 3, 5, 5)
        mySizer.AddGrowableCol(1, 1)
        mySizer.Add(panel.StaticText(text.text3), 0, wx.ALIGN_CENTER_VERTICAL)
        mySizer.Add(macroCtrl, 1, wx.EXPAND)

        panel.sizer.AddMany(((sizer1), (mySizer, 1, wx.EXPAND | wx.TOP, 5)))
        while panel.Affirmed():
            panel.SetResult(intervalCtrl.GetValue(), macroCtrl.GetValue()) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:27,代码来源:__init__.py

示例15: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_CENTER_VERTICAL [as 别名]
def __init__(self, parent, row, col, controler):
        """
            Constructor
            @param parent: RegisterNotebook object
            @param row, col: size of the table
            @param controler: _EthercatSlaveCTN class in EthercatSlave.py
            """
        self.parent = parent
        self.Data = {}
        self.Row = row
        self.Col = col
        self.Controler = controler
        self.RegisterAccessPanel = self.parent.parent.parent

        wx.grid.Grid.__init__(self, parent, -1, size=(820, 300),
                              style=wx.EXPAND | wx.ALIGN_CENTRE_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL)

        for evt, mapping_method in [(wx.grid.EVT_GRID_CELL_LEFT_CLICK, self.OnSelectCell),
                                    (wx.grid.EVT_GRID_CELL_LEFT_CLICK, self.OnSelectCell),
                                    (wx.grid.EVT_GRID_CELL_LEFT_DCLICK, self.OnRegModifyDialog)]:
            self.Bind(evt, mapping_method) 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:23,代码来源:EtherCATManagementEditor.py


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