diff options
Diffstat (limited to 'pynxc/waxy/flexgridpanel.py')
-rw-r--r-- | pynxc/waxy/flexgridpanel.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/pynxc/waxy/flexgridpanel.py b/pynxc/waxy/flexgridpanel.py new file mode 100644 index 0000000..b8e5a90 --- /dev/null +++ b/pynxc/waxy/flexgridpanel.py @@ -0,0 +1,21 @@ +# flexgridpanel.py + +# todo: styles + +import wx +import containers +import panel + +class FlexGridPanel(wx.Panel, containers.FlexGridContainer): + """ Sub-level containers inside a frame, used for layout. """ + def __init__(self, parent=None, rows=3, cols=3, hgap=1, vgap=1, + growable_cols=(), growable_rows=()): + wx.Panel.__init__(self, parent or NULL, wx.NewId()) + + self._create_sizer(rows, cols, hgap, vgap) + self.Body() + + for col in growable_cols: + self.AddGrowableCol(col) + for row in growable_rows: + self.AddGrowableRow(row) |