[GRASS-SVN] r41418 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Mar 13 11:01:30 EST 2010


Author: martinl
Date: 2010-03-13 11:01:28 -0500 (Sat, 13 Mar 2010)
New Revision: 41418

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI: combobox readonly disabled (to unset paramater)
(merge r41417 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2010-03-13 15:40:16 UTC (rev 41417)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2010-03-13 16:01:28 UTC (rev 41418)
@@ -1197,16 +1197,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