Explorar el Código

wxGUI/ModifyTableRecord: set focus on first widget

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@48084 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa hace 13 años
padre
commit
a12c258b16
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      gui/wxpython/gui_modules/dbm_dialogs.py

+ 4 - 0
gui/wxpython/gui_modules/dbm_dialogs.py

@@ -562,6 +562,7 @@ class ModifyTableRecord(wx.Dialog):
         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 @@ class ModifyTableRecord(wx.Dialog):
             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 + ":")