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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Mar 12 11:32:56 EDT 2008


Author: martinl
Date: 2008-03-12 11:32:55 -0400 (Wed, 12 Mar 2008)
New Revision: 30536

Modified:
   grass/trunk/gui/wxpython/gui_modules/digit.py
Log:
wxGUI (vdigit) cosmetics in GUI layout - use wxSpinCtrl instead of wxTextCtrl in CategoryDialog


Modified: grass/trunk/gui/wxpython/gui_modules/digit.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/digit.py	2008-03-12 14:31:28 UTC (rev 30535)
+++ grass/trunk/gui/wxpython/gui_modules/digit.py	2008-03-12 15:32:55 UTC (rev 30536)
@@ -1943,16 +1943,16 @@
 
         layerNewTxt = wx.StaticText(parent=self, id=wx.ID_ANY,
                                  label="%s:" % _("Layer"))
-        self.layerNew = wx.TextCtrl(parent=self, id=wx.ID_ANY, size=(50, -1),
-                                    value="1")
+        self.layerNew = wx.SpinCtrl(parent=self, id=wx.ID_ANY, size=(50, -1),
+                                    initial=1, min=1, max=1e9)
         catNewTxt = wx.StaticText(parent=self, id=wx.ID_ANY,
                                label="%s:" % _("Category"))
         try:
             newCat = max(self.cats[1]) + 1
         except:
             newCat = 1
-        self.catNew = wx.TextCtrl(parent=self, id=wx.ID_ANY, size=(50, -1),
-                                  value=str(newCat))
+        self.catNew = wx.SpinCtrl(parent=self, id=wx.ID_ANY, size=(75, -1),
+                                  initial=newCat, min=-1e9, max=1e9)
         btnAddCat = wx.Button(self, wx.ID_ADD)
         flexSizer.Add(item=layerNewTxt, proportion=0,
                       flag=wx.FIXED_MINSIZE | wx.ALIGN_CENTER_VERTICAL)
@@ -2240,7 +2240,7 @@
         self.itemDataMap = self.list.Populate(update=True)
 
         # update category number for add
-        self.catNew.SetValue(str(cat + 1))
+        self.catNew.SetValue(cat + 1)
 
         event.Skip()
 



More information about the grass-commit mailing list