當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。