All Samples(1361) | Call(1358) | Derive(3) | Import(0)
A flex grid sizer is a sizer which lays out its children in a
two-dimensional table with all table cells in one row having the same
height and all cells in one column having the same width, but all
rows or all columns are not necessarily the same height or width as in
the `wx.GridSizer`.
wx.FlexGridSizer can also size items equally in one direction but
unequally ("flexibly") in the other. If the sizer is only flexible
in one direction (this can be changed using `SetFlexibleDirection`), it
needs to be decided how the sizer should grow in the other ("non
flexible") direction in order to fill the available space. The
`SetNonFlexibleGrowMode` method serves this purpose.src/b/i/bitpim-HEAD/bitpim/src/hexeditor.py bitpim(Download)
class GeneralInfoSizer(wx.FlexGridSizer):
def __init__(self, parent):
super(GeneralInfoSizer, self).__init__(-1, 2, 5, 5)
self.AddGrowableCol(1)
self.Add(wx.StaticText(parent, -1, 'Struct Name:'), 0, wx.EXPAND|wx.ALL, 5)
self._struct_name=wx.TextCtrl(parent, -1, '')
self.Add(self._struct_name, 0, wx.EXPAND|wx.ALL, 5)
class NumericInfoSizer(wx.FlexGridSizer):
_sign_choices=['Unsigned', 'Signed']
_endian_choices=['Little Endian', 'Big Endian']
_size_choices=['1', '2', '4']
def __init__(self, parent):
super(NumericInfoSizer, self).__init__(-1, 2, 5, 5)
self.AddGrowableCol(1)
class StringInfoSizer(wx.FlexGridSizer):
_fixed_choices=['Fixed', 'Pascal']
def __init__(self, parent):
super(StringInfoSizer, self).__init__(-1, 2, 5, 5)
self.AddGrowableCol(1)
self.Add(wx.StaticText(parent, -1, 'Fixed/Pascal:'), 0, wx.EXPAND|wx.ALL, 5)
self._fixed=wx.ComboBox(parent, -1, value=self._fixed_choices[0],