diff options
Diffstat (limited to 'pynxc/waxy/line.py')
-rw-r--r-- | pynxc/waxy/line.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pynxc/waxy/line.py b/pynxc/waxy/line.py new file mode 100644 index 0000000..f25448c --- /dev/null +++ b/pynxc/waxy/line.py @@ -0,0 +1,18 @@ +# line.py + +import wx +import waxyobject + +class Line(wx.StaticLine, waxyobject.WaxyObject): + + def __init__(self, parent, size=(20,-1), direction='horizontal'): + style = 0 + if direction.lower().startswith('h'): + style |= wx.LI_HORIZONTAL + elif direction.lower().startswith('v'): + style |= wx.LI_HORIZONTAL + else: + raise ValueError, "direction should be horizontal or vertical" + + wx.StaticLine.__init__(self, parent, wx.NewId(), size=size, style=style) + |