[GRASS-SVN] r41417 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Mar 13 10:40:17 EST 2010
Author: martinl
Date: 2010-03-13 10:40:16 -0500 (Sat, 13 Mar 2010)
New Revision: 41417
Modified:
grass/trunk/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI: combobox readonly disabled (to unset paramater)
Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py 2010-03-12 17:55:44 UTC (rev 41416)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py 2010-03-13 15:40:16 UTC (rev 41417)
@@ -1245,16 +1245,17 @@
else:
# list of values (combo)
title_txt.SetLabel(title + ':')
- cb = wx.ComboBox(parent=which_panel, id=wx.ID_ANY, value=p.get('default',''),
- size=globalvar.DIALOG_COMBOBOX_SIZE,
- choices=valuelist, style=wx.CB_DROPDOWN | wx.CB_READONLY)
- if p.get('value','') != '':
+ cb = wx.ComboBox(parent = which_panel, id = wx.ID_ANY, value = p.get('default',''),
+ size = globalvar.DIALOG_COMBOBOX_SIZE,
+ choices = valuelist, style = wx.CB_DROPDOWN)
+ if p.get('value', '') != '':
cb.SetValue(p['value']) # parameter previously set
- which_sizer.Add( item=cb, proportion=0,
- flag=wx.ADJUST_MINSIZE | wx.BOTTOM | wx.LEFT, border=5)
- p['wxId'] = [ cb.GetId(), ]
- cb.Bind( wx.EVT_COMBOBOX, self.OnSetValue)
-
+ which_sizer.Add(item = cb, proportion = 0,
+ flag = wx.ADJUST_MINSIZE | wx.BOTTOM | wx.LEFT, border = 5)
+ p['wxId'] = [cb.GetId(),]
+ cb.Bind(wx.EVT_COMBOBOX, self.OnSetValue)
+ cb.Bind(wx.EVT_TEXT, self.OnSetValue)
+
# text entry
if (p.get('type','string') in ('string','integer','float')
and len(p.get('values',[])) == 0
More information about the grass-commit
mailing list