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


Python wx.StatusBar方法代码示例

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


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

示例1: _init_ctrls

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StatusBar [as 别名]
def _init_ctrls(self, prnt):
        wx.Frame.__init__(self, id=ID_OBJDICTEDIT, name='objdictedit',
              parent=prnt, pos=wx.Point(149, 178), size=wx.Size(1000, 700),
              style=wx.DEFAULT_FRAME_STYLE, title=_('Objdictedit'))
        self._init_utils()
        self.SetClientSize(wx.Size(1000, 700))
        self.SetMenuBar(self.MenuBar)
        self.Bind(wx.EVT_CLOSE, self.OnCloseFrame)
        if not self.ModeSolo:
            self.Bind(wx.EVT_MENU, self.OnSaveMenu, id=wx.ID_SAVE)
            accel = wx.AcceleratorTable([wx.AcceleratorEntry(wx.ACCEL_CTRL, 83, wx.ID_SAVE)])
            self.SetAcceleratorTable(accel)

        self.FileOpened = wx.Notebook(id=ID_OBJDICTEDITFILEOPENED,
              name='FileOpened', parent=self, pos=wx.Point(0, 0),
              size=wx.Size(0, 0), style=0)
        self.FileOpened.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED,
              self.OnFileSelectedChanged, id=ID_OBJDICTEDITFILEOPENED)

        self.HelpBar = wx.StatusBar(id=ID_OBJDICTEDITHELPBAR, name='HelpBar',
              parent=self, style=wx.ST_SIZEGRIP)
        self._init_coll_HelpBar_Fields(self.HelpBar)
        self.SetStatusBar(self.HelpBar) 
开发者ID:jgeisler0303,项目名称:CANFestivino,代码行数:25,代码来源:objdictedit.py

示例2: _init_ctrls

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StatusBar [as 别名]
def _init_ctrls(self, prnt):
        wx.Frame.__init__(self, id=ID_NETWORKEDIT, name='networkedit',
              parent=prnt, pos=wx.Point(149, 178), size=wx.Size(1000, 700),
              style=wx.DEFAULT_FRAME_STYLE, title=_('Networkedit'))
        self._init_utils()
        self.SetClientSize(wx.Size(1000, 700))
        self.SetMenuBar(self.MenuBar)
        self.Bind(wx.EVT_CLOSE, self.OnCloseFrame)
        if not self.ModeSolo:
            self.Bind(wx.EVT_MENU, self.OnSaveProjectMenu, id=wx.ID_SAVE)
            accel = wx.AcceleratorTable([wx.AcceleratorEntry(wx.ACCEL_CTRL, 83, wx.ID_SAVE)])
            self.SetAcceleratorTable(accel)

        NetworkEditorTemplate._init_ctrls(self, self)

        self.HelpBar = wx.StatusBar(id=ID_NETWORKEDITHELPBAR, name='HelpBar',
              parent=self, style=wx.ST_SIZEGRIP)
        self._init_coll_HelpBar_Fields(self.HelpBar)
        self.SetStatusBar(self.HelpBar) 
开发者ID:jgeisler0303,项目名称:CANFestivino,代码行数:21,代码来源:networkedit.py

示例3: addStatusBar

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StatusBar [as 别名]
def addStatusBar(self, res=None):
    if self.statusbar:
      return
    flags=0;
    if self.HasFlag(wx.RESIZE_BORDER):
      flags = wx.ST_SIZEGRIP
    self.statusbar = wx.StatusBar(self, -1, flags)
    if res:
      res.AttachUnknownControl("StatusBar", self.statusbar)
    else:
      sbHeight=self.statusbar.GetSize().y
      dlgSize=self.GetSize()
      self.SetSize( (dlgSize.x, dlgSize.y+sbHeight) )
      clientSize=self.GetClientSize()
      self.statusbar.SetDimensions(0, clientSize.y-sbHeight, clientSize.x, sbHeight)
    self.statusbar.Show() 
开发者ID:andreas-p,项目名称:admin4,代码行数:18,代码来源:controlcontainer.py

示例4: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StatusBar [as 别名]
def __init__(self, parent, id=wx.ID_ANY, style=wx.ST_SIZEGRIP,
                 name="EnhancedStatusBar"):
        """Default Class Constructor.

        EnhancedStatusBar.__init__(self, parent, id=wx.ID_ANY,
                                   style=wx.ST_SIZEGRIP,
                                   name="EnhancedStatusBar")
        """

        wx.StatusBar.__init__(self, parent, id, style, name)

        self._items = {}
        self._curPos = 0
        self._parent = parent

        wx.EVT_SIZE(self, self.OnSize)
        wx.CallAfter(self.OnSize, None) 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:19,代码来源:EnhancedStatusBar.py

示例5: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StatusBar [as 别名]
def __init__(self, parent):
        wx.StatusBar.__init__(self, parent, -1)
        self.SetFieldsCount(2)
        self.SetStatusText("None", 1)
        #self.SetStatusText("Measurement: None", 2)
        #self.Reposition() 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:8,代码来源:backend_wx.py

示例6: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StatusBar [as 别名]
def __init__(self, parent, *args, **kwargs):
        wx.StatusBar.__init__(self, parent, -1)
        self.SetFieldsCount(2) 
开发者ID:PacktPublishing,项目名称:Mastering-Elasticsearch-7.0,代码行数:5,代码来源:backend_wx.py

示例7: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StatusBar [as 别名]
def __init__(self, parent, *args, **kwargs):
        wx.StatusBar.__init__(self, parent, -1)
        self.SetFieldsCount(2)
        self.SetStatusText("None", 1)
        # self.SetStatusText("Measurement: None", 2)
        # self.Reposition() 
开发者ID:Relph1119,项目名称:GraphicDesignPatternByPython,代码行数:8,代码来源:backend_wx.py

示例8: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StatusBar [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.axes.set_xlabel('t')
        self.axes.set_ylabel('sin(t)')
        self.figure_canvas = FigureCanvas(self, -1, self.figure)

        # Note that event is a MplEvent
        self.figure_canvas.mpl_connect(
            'motion_notify_event', self.UpdateStatusBar)
        self.figure_canvas.Bind(wx.EVT_ENTER_WINDOW, self.ChangeCursor)

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

        self.statusBar = wx.StatusBar(self, -1)
        self.SetStatusBar(self.statusBar)

        self.toolbar = NavigationToolbar2Wx(self.figure_canvas)
        self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND)
        self.toolbar.Show() 
开发者ID:holzschu,项目名称:python3_ios,代码行数:31,代码来源:wxcursor_demo_sgskip.py

示例9: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StatusBar [as 别名]
def __init__(self, parent, wxid=wx.ID_ANY):
        wx.StatusBar.__init__(self, parent, wxid, style=wx.ST_SIZEGRIP|wx.WS_EX_PROCESS_IDLE )
        self.SetFieldsCount(2)
        self.SetStatusWidths([-2, self.status_text_width+32])
##        self.SetFieldsCount(3)
##        self.SetStatusWidths([-2, 24, self.status_text_width+32])
##        self.sizeChanged = False
        self.status_label = StatusLabel()
        self.current_text = ''
##        self.Bind(wx.EVT_SIZE, self.OnSize)
##        # idle events? why?
##        self.Bind(wx.EVT_IDLE, self.OnIdle)
##        self.status_light = StatusLight(self)
##        self.Reposition() 
开发者ID:kenorb-contrib,项目名称:BitTorrent,代码行数:16,代码来源:DownloadManager.py

示例10: _addControl

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StatusBar [as 别名]
def _addControl(self, n, res):
    ctl=xrc.XRCCTRL(self, n)

    if ctl:
      ctl.validator=None
      vi=n.find('-')
      if vi > 0:
        vp=n[vi+1:].split()
        validatorClass=Validator.Get(vp[0])
        if validatorClass:
          ctl.validator=validatorClass(ctl, vp[1:])
        else:
          adm.logger.debug("No validator for %s installed.", vp[0])
        name=n[:vi]
      else:
        name=n

      names=name.split(':')
      ctl.name=names[-1]
      ctl.flags=map(lambda x: x.lower(), names[:-1])

      self._ctlList.append(ctl.name)
      for flag in ctl.flags:
        if flag.startswith("label="):
          labelCtl=self.ctl(flag[6:])
          if labelCtl:
            ctl.labelCtl=labelCtl


      if self._ctls.get(name):
        adm.logger.debug("Duplicate Control Name %s", ctl.name)
      self._ctls[ctl.name.lower()] = ctl
    else:
      if n == "StatusBar":
        self.addStatusBar(res) 
开发者ID:andreas-p,项目名称:admin4,代码行数:37,代码来源:controlcontainer.py

示例11: create_widget

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StatusBar [as 别名]
def create_widget(self):
        self.widget = wx.StatusBar(self.parent.widget, -1)
        self.widget.Bind(wx.EVT_LEFT_DOWN, self.on_set_focus)
        self._set_fields()
        if self.parent.widget:
            self.parent.widget.SetStatusBar(self.widget) 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:8,代码来源:statusbar.py

示例12: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StatusBar [as 别名]
def __init__(self, parent):
        wx.StatusBar.__init__(self, parent, -1)
        self.sizeChanged = False
        self.Bind(wx.EVT_SIZE, self.OnSize)
        self.Bind(wx.EVT_IDLE, self.OnIdle)
        self.SetFieldsCount(2)
        self.SetStatusWidths([-1, 40])
        self.icons = [
            GetInternalBitmap("Tray1"),
            GetInternalBitmap("Tray3"),
            GetInternalBitmap("Tray2"),
        ]
        self.icon = wx.StaticBitmap(self, -1, self.icons[0], (0, 0), (16, 16))
        rect = self.GetFieldRect(0)

        checkBox = wx.CheckBox(self, -1, eg.text.MainFrame.onlyLogAssigned)
        self.checkBox = checkBox
        colour = wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENUBAR)
        checkBox.SetBackgroundColour(colour)
        self.checkBoxColour = checkBox.GetForegroundColour()
        checkBox.SetValue(eg.config.onlyLogAssigned)
        self.SetCheckBoxColour(eg.config.onlyLogAssigned)
        checkBox.Bind(wx.EVT_CHECKBOX, self.OnCheckBox)
        checkBox.SetPosition((rect.x + 2, rect.y + 2))
        checkBox.SetToolTipString(eg.text.MainFrame.onlyLogAssignedToolTip)

        eg.Bind("ProcessingChange", self.OnProcessingChange)
        self.Reposition() 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:30,代码来源:StatusBar.py

示例13: Destroy

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StatusBar [as 别名]
def Destroy(self):
        eg.Unbind("ProcessingChange", self.OnProcessingChange)
        return wx.StatusBar.Destroy(self) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:5,代码来源:StatusBar.py

示例14: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StatusBar [as 别名]
def __init__(self, parent):
        wx.StatusBar.__init__(self, parent, -1)
        self.SetFieldsCount(2)
        self.SetStatusText("None", 1)
        # self.SetStatusText("Measurement: None", 2)
        # self.Reposition() 
开发者ID:alvarobartt,项目名称:twitter-stock-recommendation,代码行数:8,代码来源:backend_wx.py

示例15: AddWidget

# 需要导入模块: import wx [as 别名]
# 或者: from wx import StatusBar [as 别名]
def AddWidget(self, widget, horizontalalignment=ESB_ALIGN_CENTER_HORIZONTAL,
                  verticalalignment=ESB_ALIGN_CENTER_VERTICAL, pos=-1):
        """Add A Widget To The EnhancedStatusBar.

        Parameters:

        - horizontalalignment: This Can Be One Of:
          a) ESB_EXACT_FIT: The Widget Will Fit Horizontally The StatusBar Field Width;
          b) ESB_ALIGN_CENTER_HORIZONTAL: The Widget Will Be Centered Horizontally In
             The StatusBar Field;
          c) ESB_ALIGN_LEFT: The Widget Will Be Left Aligned In The StatusBar Field;
          d) ESB_ALIGN_RIGHT: The Widget Will Be Right Aligned In The StatusBar Field;

        - verticalalignment:
          a) ESB_EXACT_FIT: The Widget Will Fit Vertically The StatusBar Field Height;
          b) ESB_ALIGN_CENTER_VERTICAL: The Widget Will Be Centered Vertically In
             The StatusBar Field;
          c) ESB_ALIGN_BOTTOM: The Widget Will Be Bottom Aligned In The StatusBar Field;
          d) ESB_ALIGN_TOP: The Widget Will Be TOP Aligned In The StatusBar Field;

        """

        if pos == -1:
            pos = self._curPos
            self._curPos += 1

        if self.GetFieldsCount() <= pos:
            raise ValueError("\nERROR: EnhancedStatusBar has a max of %d items, you tried to set item #%d" %
                             (self.GetFieldsCount(), pos))

        if horizontalalignment not in [ESB_ALIGN_CENTER_HORIZONTAL, ESB_EXACT_FIT,
                                       ESB_ALIGN_LEFT, ESB_ALIGN_RIGHT]:
            raise ValueError('\nERROR: Parameter "horizontalalignment" Should Be One Of '
                             '"ESB_ALIGN_CENTER_HORIZONTAL", "ESB_ALIGN_LEFT", "ESB_ALIGN_RIGHT"'
                             '"ESB_EXACT_FIT"')

        if verticalalignment not in [ESB_ALIGN_CENTER_VERTICAL, ESB_EXACT_FIT,
                                     ESB_ALIGN_TOP, ESB_ALIGN_BOTTOM]:
            raise ValueError('\nERROR: Parameter "verticalalignment" Should Be One Of '
                             '"ESB_ALIGN_CENTER_VERTICAL", "ESB_ALIGN_TOP", "ESB_ALIGN_BOTTOM"'
                             '"ESB_EXACT_FIT"')

        try:
            self.RemoveChild(self._items[pos].widget)
            self._items[pos].widget.Destroy()
        except KeyError:
            pass

        self._items[pos] = EnhancedStatusBarItem(widget, pos, horizontalalignment, verticalalignment)

        wx.CallAfter(self.OnSize, None) 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:53,代码来源:EnhancedStatusBar.py


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