controls/EnhancedStatusBar.py
branchwxPython4
changeset 3303 0ffb41625592
parent 2453 9900a8df922f
child 3750 f62625418bff
equal deleted inserted replaced
3302:c89fc366bebd 3303:0ffb41625592
    83         self.__dict__.update(locals())
    83         self.__dict__.update(locals())
    84 
    84 
    85 
    85 
    86 class EnhancedStatusBar(wx.StatusBar):
    86 class EnhancedStatusBar(wx.StatusBar):
    87 
    87 
    88     def __init__(self, parent, id=wx.ID_ANY, style=wx.ST_SIZEGRIP,
    88     def __init__(self, parent, id=wx.ID_ANY, style=wx.STB_SIZEGRIP,
    89                  name="EnhancedStatusBar"):
    89                  name="EnhancedStatusBar"):
    90         """Default Class Constructor.
    90         """Default Class Constructor.
    91 
    91 
    92         EnhancedStatusBar.__init__(self, parent, id=wx.ID_ANY,
    92         EnhancedStatusBar.__init__(self, parent, id=wx.ID_ANY,
    93                                    style=wx.ST_SIZEGRIP,
    93                                    style=wx.STB_SIZEGRIP,
    94                                    name="EnhancedStatusBar")
    94                                    name="EnhancedStatusBar")
    95         """
    95         """
    96 
    96 
    97         wx.StatusBar.__init__(self, parent, id, style, name)
    97         wx.StatusBar.__init__(self, parent, id, style, name)
    98 
    98 
    99         self._items = {}
    99         self._items = {}
   100         self._curPos = 0
   100         self._curPos = 0
   101         self._parent = parent
   101         self._parent = parent
   102 
   102 
   103         wx.EVT_SIZE(self, self.OnSize)
   103         self.Bind(wx.EVT_SIZE, self.OnSize)
   104         wx.CallAfter(self.OnSize, None)
   104         wx.CallAfter(self.OnSize, None)
   105 
   105 
   106     def OnSize(self, event):
   106     def OnSize(self, event):
   107         """Handles The wx.EVT_SIZE Events For The StatusBar.
   107         """Handles The wx.EVT_SIZE Events For The StatusBar.
   108 
   108