Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pynxc/waxy/statusbar.py
blob: ba9643c4865e5d501999ad20be6609722e4f9634 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# statusbar.py

import wx
import waxyobject
import styles

class StatusBar(wx.StatusBar, waxyobject.WaxyObject):

    def __init__(self, parent, numpanels=1, add=1, **kwargs):
        # note: does not support the 'size' parameter
        style = 0
        style |= self._params(kwargs)
        style |= styles.window(kwargs)

        wx.StatusBar.__init__(self, parent, wx.NewId(), style=style)

#        self.SetDefaultFont()
        self.SetFieldsCount(numpanels)
        if add:
            parent.SetStatusBar(self)

        self.BindEvents()
        styles.properties(self, kwargs)


    # allows for: statusbar[0] = "text"
    def __setitem__(self, index, text):
        self.SetStatusText(text, index)

    #
    # style parameters

    def _params(self, kwargs):
        flags = 0
        flags |= styles.stylebool('sizegrip', wx.ST_SIZEGRIP, kwargs)
        return flags