[GRASS-SVN] r54298 - grass/trunk/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Dec 15 08:59:46 PST 2012
Author: annakrat
Date: 2012-12-15 08:59:46 -0800 (Sat, 15 Dec 2012)
New Revision: 54298
Modified:
grass/trunk/gui/wxpython/gui_core/forms.py
Log:
wxGUI/forms: fix layout for too many checkboxes
Modified: grass/trunk/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/forms.py 2012-12-15 13:24:03 UTC (rev 54297)
+++ grass/trunk/gui/wxpython/gui_core/forms.py 2012-12-15 16:59:46 UTC (rev 54298)
@@ -942,10 +942,11 @@
p.get('gisprompt',False) == False and \
p.get('type', '') == 'string':
title_txt.SetLabel(" %s: (%s, %s) " % (title, p['name'], p['type']))
+ stSizer = wx.StaticBoxSizer(box = title_txt, orient = wx.VERTICAL)
if valuelist_desc:
- hSizer = wx.StaticBoxSizer(box = title_txt, orient = wx.VERTICAL)
+ hSizer = wx.FlexGridSizer(cols = 1, vgap = 1)
else:
- hSizer = wx.StaticBoxSizer(box = title_txt, orient = wx.HORIZONTAL)
+ hSizer = wx.FlexGridSizer(cols = 5, vgap = 1, hgap = 1)
isEnabled = {}
# copy default values
if p['value'] == '':
@@ -968,12 +969,13 @@
p[ 'wxId' ].append(chkbox.GetId())
if val in isEnabled:
chkbox.SetValue(True)
- hSizer.Add(item = chkbox, proportion = 0,
- flag = wx.ADJUST_MINSIZE | wx.ALL, border = 1)
+ hSizer.Add(item = chkbox, proportion = 0)
chkbox.Bind(wx.EVT_CHECKBOX, self.OnCheckBoxMulti)
idx += 1
- which_sizer.Add(item = hSizer, proportion = 0,
+ stSizer.Add(item = hSizer, proportion = 0,
+ flag = wx.ADJUST_MINSIZE | wx.ALL, border = 1)
+ which_sizer.Add(item = stSizer, proportion = 0,
flag = wx.EXPAND | wx.TOP | wx.RIGHT | wx.LEFT, border = 5)
elif p.get('gisprompt', False) == False:
if len(valuelist) == 1: # -> textctrl
More information about the grass-commit
mailing list