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


Python wx.BU_EXACTFIT屬性代碼示例

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


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

示例1: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import BU_EXACTFIT [as 別名]
def __init__(self, parent):

        wx.Button.__init__(self, parent, _NTB_AXISMENU_BUTTON, "Axes:        ",
                          style=wx.BU_EXACTFIT)
        self._toolbar = parent
        self._menu =wx.Menu()
        self._axisId = []
        # First two menu items never change...
        self._allId =wx.NewId()
        self._invertId =wx.NewId()
        self._menu.Append(self._allId, "All", "Select all axes", False)
        self._menu.Append(self._invertId, "Invert", "Invert axes selected", False)
        self._menu.AppendSeparator()

        bind(self, wx.EVT_BUTTON, self._onMenuButton, id=_NTB_AXISMENU_BUTTON)
        bind(self, wx.EVT_MENU, self._handleSelectAllAxes, id=self._allId)
        bind(self, wx.EVT_MENU, self._handleInvertAxesSelected, id=self._invertId) 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:19,代碼來源:backend_wx.py

示例2: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import BU_EXACTFIT [as 別名]
def __init__(self, parent):

        wx.Button.__init__(self, parent, wx.ID_ANY, "Axes:        ",
                           style=wx.BU_EXACTFIT)
        self._toolbar = parent
        self._menu = wx.Menu()
        self._axisId = []
        # First two menu items never change...
        self._allId = wx.NewId()
        self._invertId = wx.NewId()
        self._menu.Append(self._allId, "All", "Select all axes", False)
        self._menu.Append(self._invertId, "Invert", "Invert axes selected",
                          False)
        self._menu.AppendSeparator()

        self.Bind(wx.EVT_BUTTON, self._onMenuButton, id=self.GetId())
        self.Bind(wx.EVT_MENU, self._handleSelectAllAxes, id=self._allId)
        self.Bind(wx.EVT_MENU, self._handleInvertAxesSelected,
                  id=self._invertId) 
開發者ID:PacktPublishing,項目名稱:Mastering-Elasticsearch-7.0,代碼行數:21,代碼來源:backend_wx.py

示例3: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import BU_EXACTFIT [as 別名]
def __init__(self, parent):

        wx.Button.__init__(self, parent, _NTB_AXISMENU_BUTTON, "Axes:        ",
                           style=wx.BU_EXACTFIT)
        self._toolbar = parent
        self._menu = wx.Menu()
        self._axisId = []
        # First two menu items never change...
        self._allId = wx.NewId()
        self._invertId = wx.NewId()
        self._menu.Append(self._allId, "All", "Select all axes", False)
        self._menu.Append(self._invertId, "Invert", "Invert axes selected",
                          False)
        self._menu.AppendSeparator()

        self.Bind(wx.EVT_BUTTON, self._onMenuButton, id=_NTB_AXISMENU_BUTTON)
        self.Bind(wx.EVT_MENU, self._handleSelectAllAxes, id=self._allId)
        self.Bind(wx.EVT_MENU, self._handleInvertAxesSelected,
                  id=self._invertId) 
開發者ID:Relph1119,項目名稱:GraphicDesignPatternByPython,代碼行數:21,代碼來源:backend_wx.py

示例4: get_summary_widgets

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import BU_EXACTFIT [as 別名]
def get_summary_widgets(self, summary_panel):
        """Return a list of summary widgets suitable for sizer.AddMany."""
        self.summary_panel = summary_panel
        self.summary_name = wx.StaticText(summary_panel, -1, self.name)
        self.summary_name.Bind(wx.EVT_LEFT_UP, self.show_this_panel)

        self.summary_status = wx.StaticText(summary_panel, -1, STR_STOPPED)
        self.summary_shares_accepted = wx.StaticText(summary_panel, -1, "0")
        self.summary_shares_invalid = wx.StaticText(summary_panel, -1, "0")
        self.summary_start = wx.Button(summary_panel, -1, self.get_start_stop_state(), style=wx.BU_EXACTFIT)
        self.summary_start.Bind(wx.EVT_BUTTON, self.toggle_mining)
        self.summary_autostart = wx.CheckBox(summary_panel, -1)
        self.summary_autostart.Bind(wx.EVT_CHECKBOX, self.toggle_autostart)
        self.summary_autostart.SetValue(self.autostart)
        return [
            (self.summary_name, 0, wx.ALIGN_CENTER_HORIZONTAL),
            (self.summary_status, 0, wx.ALIGN_CENTER_HORIZONTAL, 0),
            (self.summary_shares_accepted, 0, wx.ALIGN_CENTER_HORIZONTAL, 0),
            (self.summary_shares_invalid, 0, wx.ALIGN_CENTER_HORIZONTAL, 0),
            (self.summary_start, 0, wx.ALIGN_CENTER, 0),
            (self.summary_autostart, 0, wx.ALIGN_CENTER, 0)
        ] 
開發者ID:theRealTacoTime,項目名稱:poclbm,代碼行數:24,代碼來源:guiminer.py

示例5: _set_widget_style

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import BU_EXACTFIT [as 別名]
def _set_widget_style(self):
        """Set a new widget style if the style has changed.
        For some widgets style changes are not possible, so they need to be re-created.
        The attribute recreate_on_style_change needs to be True in this case."""
        if not self.widget or not self.update_widget_style: return
        old_style = self.widget.GetWindowStyleFlag()
        new_style = self.style
        if old_style == new_style: return

        recreate = self.recreate_on_style_change
        if self.WX_CLASS == "wxButton" and (old_style & wx.BU_EXACTFIT != new_style & wx.BU_EXACTFIT):
            recreate = True  # workaround

        if not recreate:
            # update style without re-creating the widget
            self.widget.SetWindowStyleFlag(new_style)
            self.widget.Refresh()
            return

        # some widgets can't be updated, e.g. Gauge can't be switched between horizontal and vertical after creation
        # this is for ManagedBase derived classes only
        with self.frozen():
            focused = misc.focused_widget is self
            if self.sel_marker:
                self.sel_marker.Destroy()
                self.sel_marker = None
            old_widget = self.widget
            old_widget.Hide()
            if self.sizer: si = self.sizer.widget.GetItem(old_widget)
            self.create_widget()
            if self.sizer: compat.SizerItem_SetWindow(si, self.widget)
            compat.DestroyLater(old_widget)
            if self.sizer: self.sizer.item_properties_modified(self)  # will call toplevel Refresh as well

            self.finish_widget_creation(re_add=False)
            if self.sizer: self.sizer.layout()
            if focused:
                misc.focused_widget = self
                if self.sel_marker: self.sel_marker.Show(True) 
開發者ID:wxGlade,項目名稱:wxGlade,代碼行數:41,代碼來源:edit_windows.py


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