[GRASS-SVN] r48084 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 3 03:26:52 EDT 2011


Author: martinl
Date: 2011-09-03 00:26:51 -0700 (Sat, 03 Sep 2011)
New Revision: 48084

Modified:
   grass/trunk/gui/wxpython/gui_modules/dbm_dialogs.py
Log:
wxGUI/ModifyTableRecord: set focus on first widget 


Modified: grass/trunk/gui/wxpython/gui_modules/dbm_dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/dbm_dialogs.py	2011-09-03 07:07:49 UTC (rev 48083)
+++ grass/trunk/gui/wxpython/gui_modules/dbm_dialogs.py	2011-09-03 07:26:51 UTC (rev 48084)
@@ -562,6 +562,7 @@
         cId = 0
         self.usebox = False
         self.cat = None
+        winFocus = False
         for column, value in data:
             if self.keyId == cId:
                 self.cat = int(value)
@@ -578,6 +579,9 @@
             else:
                 valueWin = wx.TextCtrl(parent = self.dataPanel, id = wx.ID_ANY,
                                        value = value, size = (250, -1))
+                if not winFocus:
+                    wx.CallAfter(valueWin.SetFocus)
+                    winFocus = True
             
             label = wx.StaticText(parent = self.dataPanel, id = wx.ID_ANY,
                                   label = column + ":")



More information about the grass-commit mailing list