Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pynxc/waxy/flexgridpanel.py
blob: b8e5a900cad7a7279b37a0a5795063ae1ab7948f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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)