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


Python wx.LEFT属性代码示例

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


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

示例1: _do_layout

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LEFT [as 别名]
def _do_layout(self):
    self.SetDoubleBuffered(True)
    self.SetBackgroundColour('#f2f2f2')
    self.SetSize((180, 0))
    self.SetMinSize((180, 0))

    STD_LAYOUT = (0, wx.LEFT | wx.RIGHT | wx.EXPAND, 10)

    container = wx.BoxSizer(wx.VERTICAL)
    container.AddSpacer(15)
    container.Add(wx_util.h1(self, 'Actions'), *STD_LAYOUT)
    container.AddSpacer(5)
    self.listbox = wx.ListBox(self, -1)
    container.Add(self.listbox, 1, wx.LEFT | wx.RIGHT | wx.EXPAND, 10)
    container.AddSpacer(20)
    self.SetSizer(container)

    self.Bind(wx.EVT_LISTBOX, self.selection_change, self.listbox) 
开发者ID:ME-ICA,项目名称:me-ica,代码行数:20,代码来源:sidebar.py

示例2: __init__

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

    self.SetBackgroundColour('#ffffff')

    self.ok_button = wx.Button(self, wx.ID_OK, label='Ok')
    self.datepicker = wx.DatePickerCtrl(self, style=wx.DP_DROPDOWN)

    vertical_container = wx.BoxSizer(wx.VERTICAL)
    vertical_container.AddSpacer(10)
    vertical_container.Add(wx_util.h1(self, label='Select a Date'), 0, wx.LEFT | wx.RIGHT, 15)
    vertical_container.AddSpacer(10)
    vertical_container.Add(self.datepicker, 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 15)

    vertical_container.AddSpacer(10)
    button_sizer = wx.BoxSizer(wx.HORIZONTAL)
    button_sizer.AddStretchSpacer(1)
    button_sizer.Add(self.ok_button, 0)

    vertical_container.Add(button_sizer, 0, wx.LEFT | wx.RIGHT, 15)
    vertical_container.AddSpacer(20)
    self.SetSizerAndFit(vertical_container)

    self.Bind(wx.EVT_BUTTON, self.OnOkButton, self.ok_button) 
开发者ID:ME-ICA,项目名称:me-ica,代码行数:26,代码来源:calender_dialog.py

示例3: addMarginCtrl

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

示例4: InsertNode

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LEFT [as 别名]
def InsertNode(self, after, name, value, data=None, parent=None, bold=False):
        index = after+1
        if parent == None:
            parent = self.n[after]
        item = self.tree.InsertItem(parent, self.n[after], name)
        self.n.insert(index, item)
        ctrl = self._yCtrl()
        if bold:
            self._fatCtrl(ctrl)
        self.stack_sizer.Insert(index, ctrl, flag=wx.LEFT|wx.RIGHT|wx.EXPAND)
        ctrl.SetValue(value)
        self.t.insert(index, ctrl)
        self.d.insert(index, data)
        self.r.insert(index, True)
        #self._title_update(contents_changed=True)
        return item 
开发者ID:hvqzao,项目名称:report-ng,代码行数:18,代码来源:yamled.py

示例5: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LEFT [as 别名]
def __init__(self, targetfig):
        wx.Frame.__init__(self, None, -1, "Configure subplots")

        toolfig = Figure((6,3))
        canvas = FigureCanvasWx(self, -1, toolfig)

        # Create a figure manager to manage things
        figmgr = FigureManager(canvas, 1, self)

        # Now put all into a sizer
        sizer = wx.BoxSizer(wx.VERTICAL)
        # This way of adding to sizer allows resizing
        sizer.Add(canvas, 1, wx.LEFT|wx.TOP|wx.GROW)
        self.SetSizer(sizer)
        self.Fit()
        tool = SubplotTool(targetfig, toolfig) 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:18,代码来源:backend_wx.py

示例6: configure_subplots

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LEFT [as 别名]
def configure_subplots(self, evt):
        frame = wx.Frame(None, -1, "Configure subplots")

        toolfig = Figure((6,3))
        canvas = self.get_canvas(frame, toolfig)

        # Create a figure manager to manage things
        figmgr = FigureManager(canvas, 1, frame)

        # Now put all into a sizer
        sizer = wx.BoxSizer(wx.VERTICAL)
        # This way of adding to sizer allows resizing
        sizer.Add(canvas, 1, wx.LEFT|wx.TOP|wx.GROW)
        frame.SetSizer(sizer)
        frame.Fit()
        tool = SubplotTool(self.canvas.figure, toolfig)
        frame.Show() 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:19,代码来源:backend_wx.py

示例7: configure_subplots

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LEFT [as 别名]
def configure_subplots(self, evt):
        global FigureManager  # placates pyflakes: created by @_Backend.export
        frame = wx.Frame(None, -1, "Configure subplots")
        _set_frame_icon(frame)

        toolfig = Figure((6, 3))
        canvas = self.get_canvas(frame, toolfig)

        # Create a figure manager to manage things
        FigureManager(canvas, 1, frame)

        # Now put all into a sizer
        sizer = wx.BoxSizer(wx.VERTICAL)
        # This way of adding to sizer allows resizing
        sizer.Add(canvas, 1, wx.LEFT | wx.TOP | wx.GROW)
        frame.SetSizer(sizer)
        frame.Fit()
        SubplotTool(self.canvas.figure, toolfig)
        frame.Show() 
开发者ID:PacktPublishing,项目名称:Mastering-Elasticsearch-7.0,代码行数:21,代码来源:backend_wx.py

示例8: addCheckBoxes

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LEFT [as 别名]
def addCheckBoxes(self):
        # Regular Box Sizer 
        boxSizerH = wx.BoxSizer(wx.HORIZONTAL)
        chk1 = wx.CheckBox(self.panel, label='Disabled')
        chk1.SetValue(True)
        chk1.Disable()
        boxSizerH.Add(chk1)
        chk2 = wx.CheckBox(self.panel, label='UnChecked')
        boxSizerH.Add(chk2, flag=wx.LEFT, border=10)
        chk3 = wx.CheckBox(self.panel, label='Toggle')
        boxSizerH.Add(chk3, flag=wx.LEFT, border=10)
        chk3.SetValue(True)
        # Add Regular Box Sizer to StaticBox sizer
        self.statBoxSizerV.Add(boxSizerH, flag=wx.LEFT, border=10)
        self.statBoxSizerV.Add((0, 8))     
          
    #---------------------------------------------------------- 
开发者ID:PacktPublishing,项目名称:Python-GUI-Programming-Cookbook-Second-Edition,代码行数:19,代码来源:GUI_wxPython.py

示例9: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LEFT [as 别名]
def __init__(self, targetfig):
        global FigureManager  # placates pyflakes: created by @_Backend.export
        wx.Frame.__init__(self, None, -1, "Configure subplots")

        toolfig = Figure((6, 3))
        canvas = FigureCanvasWx(self, -1, toolfig)

        # Create a figure manager to manage things
        figmgr = FigureManager(canvas, 1, self)

        # Now put all into a sizer
        sizer = wx.BoxSizer(wx.VERTICAL)
        # This way of adding to sizer allows resizing
        sizer.Add(canvas, 1, wx.LEFT | wx.TOP | wx.GROW)
        self.SetSizer(sizer)
        self.Fit()
        tool = SubplotTool(targetfig, toolfig) 
开发者ID:Relph1119,项目名称:GraphicDesignPatternByPython,代码行数:19,代码来源:backend_wx.py

示例10: configure_subplots

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LEFT [as 别名]
def configure_subplots(self, evt):
        global FigureManager  # placates pyflakes: created by @_Backend.export
        frame = wx.Frame(None, -1, "Configure subplots")
        _set_frame_icon(frame)

        toolfig = Figure((6, 3))
        canvas = self.get_canvas(frame, toolfig)

        # Create a figure manager to manage things
        figmgr = FigureManager(canvas, 1, frame)

        # Now put all into a sizer
        sizer = wx.BoxSizer(wx.VERTICAL)
        # This way of adding to sizer allows resizing
        sizer.Add(canvas, 1, wx.LEFT | wx.TOP | wx.GROW)
        frame.SetSizer(sizer)
        frame.Fit()
        tool = SubplotTool(self.canvas.figure, toolfig)
        frame.Show() 
开发者ID:Relph1119,项目名称:GraphicDesignPatternByPython,代码行数:21,代码来源:backend_wx.py

示例11: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LEFT [as 别名]
def __init__(self):
        wx.Frame.__init__(self, None, -1,
                          'CanvasFrame', size=(550, 350))

        self.figure = Figure()
        self.axes = self.figure.add_subplot(111)
        t = np.arange(0.0, 3.0, 0.01)
        s = np.sin(2 * np.pi * t)

        self.axes.plot(t, s)
        self.canvas = FigureCanvas(self, -1, self.figure)

        self.sizer = wx.BoxSizer(wx.VERTICAL)
        self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.EXPAND)
        self.SetSizer(self.sizer)
        self.Fit()

        self.add_toolbar()  # comment this out for no toolbar 
开发者ID:holzschu,项目名称:python3_ios,代码行数:20,代码来源:embedding_in_wx2_sgskip.py

示例12: __init__

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

        self.fig = Figure((5, 4), 75)
        self.canvas = FigureCanvas(self, -1, self.fig)
        self.toolbar = NavigationToolbar(self.canvas)  # matplotlib toolbar
        self.toolbar.Realize()
        # self.toolbar.set_active([0,1])

        # Now put all into a sizer
        sizer = wx.BoxSizer(wx.VERTICAL)
        # This way of adding to sizer allows resizing
        sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW)
        # Best to allow the toolbar to resize!
        sizer.Add(self.toolbar, 0, wx.GROW)
        self.SetSizer(sizer)
        self.Fit() 
开发者ID:holzschu,项目名称:python3_ios,代码行数:19,代码来源:embedding_in_wx3_sgskip.py

示例13: _do_layout

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LEFT [as 别名]
def _do_layout(self):
    self.SetDoubleBuffered(True)
    self.SetBackgroundColour('#f2f2f2')
    self.SetSize((180, 0))
    self.SetMinSize((180, 0))

    STD_LAYOUT = (0, wx.LEFT | wx.RIGHT | wx.EXPAND, 10)

    container = wx.BoxSizer(wx.VERTICAL)
    container.AddSpacer(15)
    container.Add(wx_util.h1(self, 'Actions'), *STD_LAYOUT)
    container.AddSpacer(5)
    thing = wx.ListBox(self, -1, choices=self.contents)
    container.Add(thing, 1, wx.LEFT | wx.RIGHT | wx.EXPAND, 10)
    container.AddSpacer(20)
    self.SetSizer(container)
    thing.SetSelection(0)

    self.Bind(wx.EVT_LISTBOX, self.onClick, thing) 
开发者ID:lrq3000,项目名称:pyFileFixity,代码行数:21,代码来源:sidebar.py

示例14: __init__

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

    self.SetBackgroundColour('#ffffff')

    self.ok_button = wx.Button(self, label='Ok')
    self.datepicker = wx.DatePickerCtrl(self, style=wx.DP_DROPDOWN)

    vertical_container = wx.BoxSizer(wx.VERTICAL)
    vertical_container.AddSpacer(10)
    vertical_container.Add(wx_util.h1(self, label='Select a Date'), 0, wx.LEFT | wx.RIGHT, 15)
    vertical_container.AddSpacer(10)
    vertical_container.Add(self.datepicker, 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 15)

    vertical_container.AddSpacer(10)
    button_sizer = wx.BoxSizer(wx.HORIZONTAL)
    button_sizer.AddStretchSpacer(1)
    button_sizer.Add(self.ok_button, 0)

    vertical_container.Add(button_sizer, 0, wx.LEFT | wx.RIGHT, 15)
    vertical_container.AddSpacer(20)
    self.SetSizerAndFit(vertical_container)

    self.Bind(wx.EVT_BUTTON, self.OnOkButton, self.ok_button) 
开发者ID:lrq3000,项目名称:pyFileFixity,代码行数:26,代码来源:calender_dialog.py

示例15: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import LEFT [as 别名]
def __init__(self, parent, pickerClass, pickerGetter, localizedPickerLabel):
    wx.Dialog.__init__(self, parent, title=localizedPickerLabel)

    self.SetBackgroundColour('#ffffff')

    self.ok_button = wx.Button(self, wx.ID_OK, label=_('ok'))
    self.picker = pickerClass(self, style=Constants.WX_DP_DROPDOWN)
    self.pickerGetter = pickerGetter

    vertical_container = wx.BoxSizer(wx.VERTICAL)
    vertical_container.AddSpacer(10)
    vertical_container.Add(self.picker, 0, wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER, 15)

    vertical_container.AddSpacer(10)
    button_sizer = wx.BoxSizer(wx.HORIZONTAL)
    button_sizer.AddStretchSpacer(1)
    button_sizer.Add(self.ok_button, 0)

    vertical_container.Add(button_sizer, 0, wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER, 15)
    vertical_container.AddSpacer(20)
    self.SetSizerAndFit(vertical_container)

    self.Bind(wx.EVT_BUTTON, self.onOkButton, self.ok_button) 
开发者ID:chriskiehl,项目名称:Gooey,代码行数:25,代码来源:base_dialog.py


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