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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jun 24 08:28:21 EDT 2009


Author: martinl
Date: 2009-06-24 08:28:21 -0400 (Wed, 24 Jun 2009)
New Revision: 38053

Modified:
   grass/trunk/gui/wxpython/gui_modules/prompt.py
Log:
fix combobox size


Modified: grass/trunk/gui/wxpython/gui_modules/prompt.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/prompt.py	2009-06-24 12:17:37 UTC (rev 38052)
+++ grass/trunk/gui/wxpython/gui_modules/prompt.py	2009-06-24 12:28:21 UTC (rev 38053)
@@ -220,7 +220,7 @@
         listmix.ListCtrlAutoWidthMixin.__init__(self)
         
 class TextCtrlAutoComplete(wx.ComboBox, listmix.ColumnSorterMixin):
-    def __init__ (self, parent, statusbar, 
+    def __init__ (self, parent, statusbar,
                   id = wx.ID_ANY, choices = [], **kwargs):
         """!Constructor works just like wx.TextCtrl except you can pass in a
         list of choices.  You can also change the choice list at any time
@@ -236,7 +236,7 @@
             kwargs['style'] = wx.TE_PROCESS_ENTER
         
         wx.ComboBox.__init__(self, parent, id, **kwargs)
-
+        
         # some variables
         self._choices = choices
         self._hideOnNoMatch = True
@@ -269,14 +269,15 @@
             self._choicesMap[type] = grass.list_strings(type = type[:4])
         # first search for GRASS module
         self.SetChoices(self._choicesCmd)
-
+        
+        self.SetMinSize(self.GetSize())
         # read history
         self.SetHistoryItems()
         
         # bindings...
-        self.Bind(wx.EVT_KILL_FOCUS, self.OnControlChanged, self)
-        self.Bind(wx.EVT_TEXT, self.OnEnteredText, self)
-        self.Bind(wx.EVT_KEY_DOWN , self.OnKeyDown, self)
+        self.Bind(wx.EVT_KILL_FOCUS, self.OnControlChanged)
+        self.Bind(wx.EVT_TEXT, self.OnEnteredText)
+        self.Bind(wx.EVT_KEY_DOWN , self.OnKeyDown)
 
         # if need drop down on left click
         self.dropdown.Bind(wx.EVT_LISTBOX , self.OnListItemSelected, self.dropdownlistbox)



More information about the grass-commit mailing list