Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pynxc/waxy/label.py~
blob: eb2e2661b2e49bf783f0af437c2822a3f43a81fe (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
# label.py

import wx
import containers
import waxyobject
import styles

class Label(wx.StaticText, waxyobject.WaxObject):

    def __init__(self, parent, text="", size=None, **kwargs):
        #assert isinstance(parent, containers.Container)

        style = 0
        style |= self._params(kwargs)
        style |= styles.window(kwargs)

        wx.StaticText.__init__(self, parent, wx.NewId(), text,
         size=size or (-1,-1), style=style)
        styles.properties(self, kwargs)

    #
    # style parameters

    __styles__ = {
        'align': ({
            'left': wx.ALIGN_LEFT,
            'right': wx.ALIGN_RIGHT,
            'center': wx.ALIGN_CENTRE,
            'centre': wx.ALIGN_CENTRE,
        }, styles.DICTSTART),
        'noresize': (wx.ST_NO_AUTORESIZE, styles.NORMAL),
    }