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


Python wx.ALIGN_RIGHT属性代码示例

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


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

示例1: addCombo

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

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

示例3: _do_layout

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

示例4: _set_layout

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

        main_sizer.Add(self.notebook, 1, wx.EXPAND | wx.ALL, border=5)
        main_sizer.Add(self.separator_line, 0, wx.EXPAND)

        buttons_sizer = wx.BoxSizer(wx.HORIZONTAL)
        buttons_sizer.Add(self.reset_button)
        buttons_sizer.AddSpacer((5, -1))
        buttons_sizer.Add(self.close_button)

        main_sizer.Add(buttons_sizer, flag=wx.ALIGN_RIGHT | wx.ALL, border=5)

        self.panel.SetSizer(main_sizer)

        self.panel.Layout() 
开发者ID:MrS0m30n3,项目名称:youtube-dl-gui,代码行数:18,代码来源:optionsframe.py

示例5: __do_layout

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_RIGHT [as 别名]
def __do_layout(self):
        # begin wxGlade: Frame192.__do_layout
        self.sizer_as_attr = wx.FlexGridSizer(3, 1, 0, 0)
        sizer_local = wx.BoxSizer(wx.HORIZONTAL)
        label_1 = wx.StaticText(self, wx.ID_ANY, _("Just a text"), style=wx.ALIGN_CENTER)
        self.sizer_as_attr.Add(label_1, 1, wx.ALIGN_CENTER | wx.ALL | wx.EXPAND | wx.SHAPED, 5)
        static_line_1 = wx.StaticLine(self, wx.ID_ANY)
        self.sizer_as_attr.Add(static_line_1, 0, wx.ALL | wx.EXPAND, 5)
        sizer_local.Add(self.button_2, 0, 0, 0)
        sizer_local.Add(self.button_1, 0, 0, 0)
        self.sizer_as_attr.Add(sizer_local, 1, wx.ALIGN_RIGHT | wx.ALL, 5)
        self.SetSizer(self.sizer_as_attr)
        self.sizer_as_attr.SetSizeHints(self)
        self.sizer_as_attr.AddGrowableRow(0)
        self.sizer_as_attr.AddGrowableCol(0)
        self.Layout()
        # end wxGlade

# end of class Frame192 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:21,代码来源:bug192.py

示例6: initTotal

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_RIGHT [as 别名]
def initTotal(self, total):
        self.total = total if total > 0 else 0
        self.gauge_total = wx.Gauge(self, wx.ID_ANY, 10000, wx.DefaultPosition, wx.DefaultSize,
                                       wx.GA_HORIZONTAL)
        self.gauge_total.SetValue(0)
        self.text_percent = wx.StaticText(self, wx.ID_ANY, '0%', wx.DefaultPosition,
                                          wx.Size(42, -1), wx.ALIGN_RIGHT)
        self.text_speed = wx.StaticText(self, wx.ID_ANY, '0B/s', wx.DefaultPosition, wx.Size(65, -1),
                                        wx.ALIGN_RIGHT)

        self.text_percent.Wrap(-1)
        self.text_speed.Wrap(-1)

        self.sizer_total.Add(self.text_percent, 0, wx.ALL, 5)
        self.sizer_total.Add(self.gauge_total, 5, wx.ALL | wx.EXPAND, 5)
        self.sizer_total.Add(self.text_speed, 0, wx.ALL, 5) 
开发者ID:ZSAIm,项目名称:iqiyi-parser,代码行数:18,代码来源:frame_downloader.py

示例7: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_RIGHT [as 别名]
def __init__(self, parent, hwnds):
        eg.Dialog.__init__(
            self,
            parent,
            title="Found Windows",
            size=(500, 350),
            style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER,
        )
        windowList = eg.WindowList(self, hwnds)
        okButton = wx.Button(self, wx.ID_OK)
        btnSizer = eg.HBoxSizer(
            ((0, 0), 1, wx.EXPAND),
            (okButton, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.EXPAND | wx.ALL, 5),
            ((0, 0), 1, wx.EXPAND),
            (eg.SizeGrip(self), 0, wx.ALIGN_BOTTOM | wx.ALIGN_RIGHT),
        )
        mainSizer = eg.VBoxSizer(
            (windowList, 1, wx.EXPAND | wx.TOP | wx.LEFT | wx.RIGHT, 5),
            (btnSizer, 0, wx.EXPAND),
        )
        self.SetSizer(mainSizer) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:23,代码来源:FindWindow.py

示例8: Configure

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_RIGHT [as 别名]
def Configure(self,label="",cmdline=""):
        panel = eg.ConfigPanel(self)
        mainSizer =wx.BoxSizer(wx.VERTICAL)
        cmdlineLbl=wx.StaticText(panel, -1, self.text.cmdline)
        cmdlineCtrl=wx.TextCtrl(panel,-1,cmdline)
        cmdlineCtrl.SetMinSize((400,20))
        hlpbtnCtrl = wx.Button(panel, -1, self.text.help)
        def onBtnClick(event):
            self.plugin.OpenHelpPage('hlp_command_line.htm')
            event.Skip()
        hlpbtnCtrl.Bind(wx.EVT_BUTTON, onBtnClick, hlpbtnCtrl)
        labelLbl=wx.StaticText(panel, -1, self.text.label)
        labelCtrl=wx.TextCtrl(panel,-1,label)
        mainSizer.Add(cmdlineLbl,0,wx.TOP,20)
        mainSizer.Add(cmdlineCtrl,0,wx.EXPAND)
        mainSizer.Add(hlpbtnCtrl,0,wx.ALIGN_RIGHT|wx.TOP,8)
        mainSizer.Add(labelLbl,0,wx.ALIGN_RIGHT|wx.TOP,50)
        mainSizer.Add(labelCtrl,0,wx.ALIGN_RIGHT)
        panel.sizer.Add(mainSizer)
        while panel.Affirmed():
            panel.SetResult(labelCtrl.GetValue(),cmdlineCtrl.GetValue()) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:23,代码来源:__init__.py

示例9: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_RIGHT [as 别名]
def __init__(self, parent, enable_required=True):
        wx.Dialog.__init__(self, parent, title=_('Project properties'),
                           style=wx.DEFAULT_DIALOG_STYLE)

        main_sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=10)
        main_sizer.AddGrowableCol(0)
        main_sizer.AddGrowableRow(0)

        self.ProjectProperties = ProjectPropertiesPanel(
            self, enable_required=enable_required, scrolling=False)
        main_sizer.AddWindow(self.ProjectProperties, flag=wx.GROW)

        self.ButtonSizer = self.CreateButtonSizer(wx.OK | wx.CANCEL | wx.CENTRE)
        self.Bind(wx.EVT_BUTTON, self.OnOK,
                  self.ButtonSizer.GetAffirmativeButton())
        main_sizer.AddSizer(self.ButtonSizer, border=20,
                            flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)

        self.SetSizer(main_sizer)
        self.ProjectProperties.Fit()
        self.Fit() 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:23,代码来源:ProjectDialog.py

示例10: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_RIGHT [as 别名]
def __init__(self, parent, info):
        wx.Dialog.__init__(self, parent, title=_("License"), size=(500, 400),
                           style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)

        if parent and parent.GetIcon():
            self.SetIcon(parent.GetIcon())

        self.SetMinSize((400, 300))
        close = wx.Button(self, id=wx.ID_CLOSE, label=_("&Close"))

        ctrl = wx.TextCtrl(self, style=wx.TE_READONLY | wx.TE_MULTILINE)
        ctrl.SetValue(info.License)

        btnSizer = wx.BoxSizer(wx.HORIZONTAL)
        btnSizer.Add(close)

        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(ctrl, 1, wx.EXPAND | wx.ALL, 10)
        sizer.Add(btnSizer, flag=wx.ALIGN_RIGHT | wx.RIGHT | wx.BOTTOM, border=10)
        self.SetSizer(sizer)
        self.Layout()
        self.Show()
        self.SetEscapeId(close.GetId())

        close.Bind(wx.EVT_BUTTON, lambda evt: self.Destroy()) 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:27,代码来源:AboutDialog.py

示例11: GetBitmapRect

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_RIGHT [as 别名]
def GetBitmapRect(self):
        client_size = self.GetClientSize()
        bitmap_size = self.BackgroundBitmap.GetSize()

        if self.BackgroundAlign & wx.ALIGN_RIGHT:
            x = client_size[0] - bitmap_size[0]
        elif self.BackgroundAlign & wx.ALIGN_CENTER_HORIZONTAL:
            x = (client_size[0] - bitmap_size[0]) // 2
        else:
            x = 0

        if self.BackgroundAlign & wx.ALIGN_BOTTOM:
            y = client_size[1] - bitmap_size[1]
        elif self.BackgroundAlign & wx.ALIGN_CENTER_VERTICAL:
            y = (client_size[1] - bitmap_size[1]) // 2
        else:
            y = 0

        return wx.Rect(x, y, bitmap_size[0], bitmap_size[1]) 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:21,代码来源:CustomTree.py

示例12: __do_layout

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_RIGHT [as 别名]
def __do_layout(self):
        # begin wxGlade: SerialDialog.__do_layout
        sizer_4 = wx.StaticBoxSizer(self.sizer_4_staticbox, wx.HORIZONTAL)
        grid_sizer_3 = wx.FlexGridSizer(7, 2, 2, 2)
        grid_sizer_3.Add(self.label_port, 0, wx.LEFT, 8)
        grid_sizer_3.Add(self.combo_box_port, 0, 0, 0)
        grid_sizer_3.Add(self.label_baudrate, 0, wx.LEFT, 8)
        grid_sizer_3.Add(self.combo_box_baudrate, 0, 0, 0)
        grid_sizer_3.Add(self.label_bytesize, 0, wx.LEFT, 8)
        grid_sizer_3.Add(self.combo_box_bytesize, 0, 0, 0)
        grid_sizer_3.Add(self.label_parity, 0, wx.LEFT, 8)
        grid_sizer_3.Add(self.combo_box_parity, 0, 0, 0)
        grid_sizer_3.Add(self.label_stopbits, 0, wx.LEFT, 8)
        grid_sizer_3.Add(self.combo_box_stopbits, 0, 0, 0)
        grid_sizer_3.Add(self.radio_box_rtscts, 0, wx.RIGHT|wx.TOP|wx.BOTTOM, 8)
        grid_sizer_3.Add(self.radio_box_xonxoff, 0, wx.LEFT|wx.TOP|wx.BOTTOM|wx.ALIGN_RIGHT, 8)
        grid_sizer_3.Add(self.button_cancel, 0, 0, 0)
        grid_sizer_3.Add(self.button_ok, 0, wx.ALIGN_RIGHT, 0)
        sizer_4.Add(grid_sizer_3, 1, wx.ALL|wx.EXPAND, 6)
        self.SetSizer(sizer_4)
        sizer_4.Fit(self)
        self.Layout()
        # end wxGlade 
开发者ID:nccgroup,项目名称:Zulu,代码行数:25,代码来源:settingsDialog.py

示例13: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_RIGHT [as 别名]
def __init__(self, canvas, legend):
        NavigationToolbar2Wx.__init__(self, canvas)
        self._canvas = canvas
        self._legend = legend
        self._autoScale = True

        if matplotlib.__version__ >= '1.2':
            panId = self.wx_ids['Pan']
        else:
            panId = self.FindById(self._NTB2_PAN).GetId()
        self.ToggleTool(panId, True)
        self.pan()

        checkLegend = wx.CheckBox(self, label='Legend')
        checkLegend.SetValue(legend.get_visible())
        self.AddControl(checkLegend)
        self.Bind(wx.EVT_CHECKBOX, self.__on_legend, checkLegend, id)

        if wx.__version__ >= '2.9.1':
            self.AddStretchableSpace()
        else:
            self.AddSeparator()

        self._textCursor = wx.StaticText(self, style=wx.ALL | wx.ALIGN_RIGHT)
        font = self._textCursor.GetFont()
        if wx.__version__ >= '2.9.1':
            font.MakeSmaller()
        font.SetFamily(wx.FONTFAMILY_TELETYPE)
        self._textCursor.SetFont(font)
        w, _h = get_text_size(' ' * 18, font)
        self._textCursor.SetSize((w, -1))

        self.AddControl(self._textCursor)

        self.Realize() 
开发者ID:EarToEarOak,项目名称:RF-Monitor,代码行数:37,代码来源:navigation_toolbar.py

示例14: _do_layout

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_RIGHT [as 别名]
def _do_layout(self):
    vsizer = wx.BoxSizer(wx.VERTICAL)
    sizer = wx.BoxSizer(wx.HORIZONTAL)
    headings_sizer = self.build_heading_sizer()
    sizer.Add(headings_sizer, 1, wx.ALIGN_LEFT | wx.ALIGN_CENTER_HORIZONTAL | wx.EXPAND | wx.LEFT, PAD_SIZE)
    sizer.Add(self.settings_img, 0, wx.ALIGN_RIGHT | wx.EXPAND | wx.RIGHT, PAD_SIZE)
    sizer.Add(self.running_img, 0, wx.ALIGN_RIGHT | wx.EXPAND | wx.RIGHT, PAD_SIZE)
    sizer.Add(self.check_mark, 0, wx.ALIGN_RIGHT | wx.EXPAND | wx.RIGHT, PAD_SIZE)
    sizer.Add(self.error_symbol, 0, wx.ALIGN_RIGHT | wx.EXPAND | wx.RIGHT, PAD_SIZE)
    self.running_img.Hide()
    self.check_mark.Hide()
    self.error_symbol.Hide()
    vsizer.Add(sizer, 1, wx.EXPAND)
    self.SetSizer(vsizer) 
开发者ID:ME-ICA,项目名称:me-ica,代码行数:16,代码来源:header.py

示例15: _do_layout

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ALIGN_RIGHT [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.Add(self.progress_bar, 0, wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.LEFT, 20)
    self.progress_bar.Hide()

    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)
    h_sizer.Add(self.stop_button, 0, wx.ALIGN_RIGHT | wx.RIGHT, 20)

    v_sizer.AddStretchSpacer(1)
    v_sizer.Add(h_sizer, 0, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND)

    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:ME-ICA,项目名称:me-ica,代码行数:29,代码来源:footer.py


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