[GRASS-SVN] r41419 -
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Mar 13 11:08:45 EST 2010
Author: martinl
Date: 2010-03-13 11:08:45 -0500 (Sat, 13 Mar 2010)
New Revision: 41419
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI: combobox readonly disabled (to unset paramater)
(merge r41417 from trunk)
Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py 2010-03-13 16:01:28 UTC (rev 41418)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py 2010-03-13 16:08:45 UTC (rev 41419)
@@ -1265,16 +1265,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)
-
+ 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