當前位置: 首頁>>代碼示例>>Python>>正文


Python wx.TB_HORIZONTAL屬性代碼示例

本文整理匯總了Python中wx.TB_HORIZONTAL屬性的典型用法代碼示例。如果您正苦於以下問題:Python wx.TB_HORIZONTAL屬性的具體用法?Python wx.TB_HORIZONTAL怎麽用?Python wx.TB_HORIZONTAL使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在wx的用法示例。


在下文中一共展示了wx.TB_HORIZONTAL屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import TB_HORIZONTAL [as 別名]
def __init__(self, toolmanager, parent, style=wx.TB_HORIZONTAL):
        ToolContainerBase.__init__(self, toolmanager)
        wx.ToolBar.__init__(self, parent, -1, style=style)
        self._toolitems = {}
        self._groups = {} 
開發者ID:PacktPublishing,項目名稱:Mastering-Elasticsearch-7.0,代碼行數:7,代碼來源:backend_wx.py

示例2: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import TB_HORIZONTAL [as 別名]
def __init__(self, parent):
        """Constructor, creating the reader toolbar."""
        wx.ToolBar.__init__(
           self,
           parent,
           pos=wx.DefaultPosition,
           size=wx.DefaultSize,
           style=wx.SIMPLE_BORDER | wx.TB_HORIZONTAL | wx.TB_FLAT | wx.TB_TEXT,
           name='Reader Toolbar')

        # create bitmaps for toolbar
        tsize = (16, 16)
        if None != ICO_READER:
            bmpReader = wx.Bitmap(ICO_READER, wx.BITMAP_TYPE_ICO)
        else:
            bmpReader = wx.ArtProvider_GetBitmap(
                wx.ART_HELP_BOOK, wx.ART_OTHER, tsize)
        if None != ICO_SMARTCARD:
            bmpCard = wx.Bitmap(ICO_SMARTCARD, wx.BITMAP_TYPE_ICO)
        else:
            bmpCard = wx.ArtProvider_GetBitmap(
                wx.ART_HELP_BOOK, wx.ART_OTHER, tsize)
        self.readercombobox = ReaderComboBox(self)

        # create and add controls
        self.AddSimpleTool(
            10,
            bmpReader,
            "Select smart card reader",
            "Select smart card reader")
        self.AddControl(self.readercombobox)
        self.AddSeparator()
        self.AddSimpleTool(
            20,
            bmpCard, "Connect to smartcard",
            "Connect to smart card")
        self.AddSeparator()

        self.Realize() 
開發者ID:LudovicRousseau,項目名稱:pyscard,代碼行數:41,代碼來源:ReaderToolbar.py

示例3: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import TB_HORIZONTAL [as 別名]
def __init__(self, toolmanager, parent, style=wx.TB_HORIZONTAL):
        ToolContainerBase.__init__(self, toolmanager)
        wx.ToolBar.__init__(self, parent, -1, style=style)
        self._toolitems = {}
        self._groups = {}
        self._last = None 
開發者ID:Relph1119,項目名稱:GraphicDesignPatternByPython,代碼行數:8,代碼來源:backend_wx.py

示例4: create_widget

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import TB_HORIZONTAL [as 別名]
def create_widget(self):
        tb_style = wx.TB_HORIZONTAL | self.style
        if wx.Platform == '__WXGTK__':
            tb_style |= wx.TB_DOCKABLE | wx.TB_FLAT
        if self.IS_TOPLEVEL:
            # "top-level" toolbar
            self.widget = wx.Frame(None, -1, misc.design_title(self.name))
            self.widget.SetClientSize((400, 30))
            self._tb = wx.ToolBar(self.widget, -1, style=tb_style)
            self.widget.SetToolBar(self._tb)
            self.widget.SetBackgroundColour(self.widget.GetBackgroundColour())
            icon = compat.wx_EmptyIcon()
            xpm = os.path.join(config.icons_path, 'toolbar.xpm')
            icon.CopyFromBitmap(misc.get_xpm_bitmap(xpm))
            self.widget.SetIcon(icon)
            self.widget.Bind(wx.EVT_CLOSE, lambda e: self.hide_widget())
            self.widget.Bind(wx.EVT_LEFT_DOWN, self.on_set_focus)
            if wx.Platform == '__WXMSW__':
                # MSW isn't smart enough to avoid overlapping windows, so
                # at least move it away from the 3 wxGlade frames
                self.widget.CenterOnScreen()
        else:
            # toolbar for a Frame
            self.widget = self._tb = wx.ToolBar(self.parent.widget, -1, style=tb_style)
            self.parent.widget.SetToolBar(self.widget)

        self.widget.Bind(wx.EVT_LEFT_DOWN, self.on_set_focus)

        # set the various property values
        self._set_bitmapsize()
        self._set_margins()
        self._set_packing()
        self._set_separation()

        self._set_tools()  # show the menus 
開發者ID:wxGlade,項目名稱:wxGlade,代碼行數:37,代碼來源:toolbar.py


注:本文中的wx.TB_HORIZONTAL屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。