Python wx.StatusBar() Examples
The following are 26
code examples of wx.StatusBar().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
wx
, or try the search function
.
Example #1
Source File: EnhancedStatusBar.py From OpenPLC_Editor with GNU General Public License v3.0 | 6 votes |
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)
Example #2
Source File: controlcontainer.py From admin4 with Apache License 2.0 | 6 votes |
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()
Example #3
Source File: objdictedit.py From CANFestivino with GNU Lesser General Public License v2.1 | 6 votes |
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)
Example #4
Source File: networkedit.py From CANFestivino with GNU Lesser General Public License v2.1 | 6 votes |
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)
Example #5
Source File: DownloadManager.py From BitTorrent with GNU General Public License v3.0 | 5 votes |
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()
Example #6
Source File: backend_wx.py From twitter-stock-recommendation with MIT License | 5 votes |
def __init__(self, parent): wx.StatusBar.__init__(self, parent, -1) self.SetFieldsCount(2) self.SetStatusText("None", 1) # self.SetStatusText("Measurement: None", 2) # self.Reposition()
Example #7
Source File: StatusBar.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def Destroy(self): eg.Unbind("ProcessingChange", self.OnProcessingChange) return wx.StatusBar.Destroy(self)
Example #8
Source File: StatusBar.py From EventGhost with GNU General Public License v2.0 | 5 votes |
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()
Example #9
Source File: backend_wx.py From CogAlg with MIT License | 5 votes |
def __init__(self, parent, *args, **kwargs): StatusbarBase.__init__(self, *args, **kwargs) wx.StatusBar.__init__(self, parent, -1) self.SetFieldsCount(1) self.SetStatusText("")
Example #10
Source File: backend_wx.py From CogAlg with MIT License | 5 votes |
def __init__(self, parent, *args, **kwargs): wx.StatusBar.__init__(self, parent, -1) self.SetFieldsCount(2)
Example #11
Source File: backend_wx.py From coffeegrindsize with MIT License | 5 votes |
def __init__(self, parent, *args, **kwargs): StatusbarBase.__init__(self, *args, **kwargs) wx.StatusBar.__init__(self, parent, -1) self.SetFieldsCount(1) self.SetStatusText("")
Example #12
Source File: backend_wx.py From coffeegrindsize with MIT License | 5 votes |
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()
Example #13
Source File: statusbar.py From wxGlade with MIT License | 5 votes |
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)
Example #14
Source File: controlcontainer.py From admin4 with Apache License 2.0 | 5 votes |
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)
Example #15
Source File: backend_wx.py From Computable with MIT License | 5 votes |
def __init__(self, parent): wx.StatusBar.__init__(self, parent, -1) self.SetFieldsCount(2) self.SetStatusText("None", 1) #self.SetStatusText("Measurement: None", 2) #self.Reposition()
Example #16
Source File: backend_wx.py From ImageFusion with MIT License | 5 votes |
def __init__(self, parent): wx.StatusBar.__init__(self, parent, -1) self.SetFieldsCount(2) self.SetStatusText("None", 1) #self.SetStatusText("Measurement: None", 2) #self.Reposition()
Example #17
Source File: backend_wx.py From python3_ios with BSD 3-Clause "New" or "Revised" License | 5 votes |
def __init__(self, parent, *args, **kwargs): StatusbarBase.__init__(self, *args, **kwargs) wx.StatusBar.__init__(self, parent, -1) self.SetFieldsCount(1) self.SetStatusText("")
Example #18
Source File: backend_wx.py From python3_ios with BSD 3-Clause "New" or "Revised" License | 5 votes |
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()
Example #19
Source File: wxcursor_demo_sgskip.py From python3_ios with BSD 3-Clause "New" or "Revised" License | 5 votes |
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()
Example #20
Source File: backend_wx.py From GraphicDesignPatternByPython with MIT License | 5 votes |
def __init__(self, parent, *args, **kwargs): StatusbarBase.__init__(self, *args, **kwargs) wx.StatusBar.__init__(self, parent, -1) self.SetFieldsCount(1) self.SetStatusText("")
Example #21
Source File: backend_wx.py From GraphicDesignPatternByPython with MIT License | 5 votes |
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()
Example #22
Source File: backend_wx.py From neural-network-animation with MIT License | 5 votes |
def __init__(self, parent): wx.StatusBar.__init__(self, parent, -1) self.SetFieldsCount(2) self.SetStatusText("None", 1) #self.SetStatusText("Measurement: None", 2) #self.Reposition()
Example #23
Source File: backend_wx.py From matplotlib-4-abaqus with MIT License | 5 votes |
def __init__(self, parent): wx.StatusBar.__init__(self, parent, -1) self.SetFieldsCount(2) self.SetStatusText("None", 1) #self.SetStatusText("Measurement: None", 2) #self.Reposition()
Example #24
Source File: backend_wx.py From Mastering-Elasticsearch-7.0 with MIT License | 5 votes |
def __init__(self, parent, *args, **kwargs): StatusbarBase.__init__(self, *args, **kwargs) wx.StatusBar.__init__(self, parent, -1) self.SetFieldsCount(1) self.SetStatusText("")
Example #25
Source File: backend_wx.py From Mastering-Elasticsearch-7.0 with MIT License | 5 votes |
def __init__(self, parent, *args, **kwargs): wx.StatusBar.__init__(self, parent, -1) self.SetFieldsCount(2)
Example #26
Source File: EnhancedStatusBar.py From OpenPLC_Editor with GNU General Public License v3.0 | 4 votes |
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)