Fixing bug in displaying variable panel header on Windows
authorlaurent
Tue, 17 Jan 2012 18:46:06 +0100
changeset 627 99ab0b74865f
parent 626 ac0a8f6462c3
child 628 edcd40605fff
Fixing bug in displaying variable panel header on Windows
controls/VariablePanel.py
--- a/controls/VariablePanel.py	Tue Jan 17 17:20:54 2012 +0100
+++ b/controls/VariablePanel.py	Tue Jan 17 18:46:06 2012 +0100
@@ -347,7 +347,7 @@
         parent.AddWindow(self.DownButton, 0, border=0, flag=0)
         
     def _init_coll_ControlPanelSizer_Growables(self, parent):
-        parent.AddGrowableCol(3)
+        parent.AddGrowableCol(5)
         parent.AddGrowableRow(0)
 
     def _init_sizers(self):
@@ -391,7 +391,7 @@
 
         self.ReturnType = wx.ComboBox(id=ID_VARIABLEEDITORPANELRETURNTYPE,
               name='ReturnType', parent=self.ControlPanel, pos=wx.Point(0, 0),
-              size=wx.Size(145, 28), style=wx.CB_READONLY)
+              size=wx.Size(145, -1), style=wx.CB_READONLY)
         self.Bind(wx.EVT_COMBOBOX, self.OnReturnTypeChanged, id=ID_VARIABLEEDITORPANELRETURNTYPE)
 
         self.DescriptionLabel = wx.StaticText(id=ID_VARIABLEEDITORPANELDESCRIPTIONLABEL,
@@ -400,7 +400,7 @@
 
         self.Description = wx.TextCtrl(id=ID_VARIABLEEDITORPANELDESCRIPTION,
               name='Description', parent=self.ControlPanel, pos=wx.Point(0, 0),
-              size=wx.Size(250, 28), style=wx.TE_PROCESS_ENTER)
+              size=wx.Size(250, -1), style=wx.TE_PROCESS_ENTER)
         self.Bind(wx.EVT_TEXT_ENTER, self.OnDescriptionChanged, id=ID_VARIABLEEDITORPANELDESCRIPTION)
         self.Description.Bind(wx.EVT_KILL_FOCUS, self.OnDescriptionChanged)
         
@@ -410,7 +410,7 @@
 
         self.ClassFilter = wx.ComboBox(id=ID_VARIABLEEDITORPANELCLASSFILTER,
               name='ClassFilter', parent=self.ControlPanel, pos=wx.Point(0, 0),
-              size=wx.Size(145, 28), style=wx.CB_READONLY)
+              size=wx.Size(145, -1), style=wx.CB_READONLY)
         self.Bind(wx.EVT_COMBOBOX, self.OnClassFilter, id=ID_VARIABLEEDITORPANELCLASSFILTER)
 
         self.AddButton = wx.Button(id=ID_VARIABLEEDITORPANELADDBUTTON, label=_('Add'),
@@ -423,11 +423,11 @@
         
         self.UpButton = wx.Button(id=ID_VARIABLEEDITORPANELUPBUTTON, label='^',
               name='UpButton', parent=self.ControlPanel, pos=wx.Point(0, 0),
-              size=wx.Size(28, 28), style=0)
+              size=wx.Size(28, -1), style=0)
         
         self.DownButton = wx.Button(id=ID_VARIABLEEDITORPANELDOWNBUTTON, label='v',
               name='DownButton', parent=self.ControlPanel, pos=wx.Point(0, 0),
-              size=wx.Size(28, 28), style=0)
+              size=wx.Size(28, -1), style=0)
         
         self._init_sizers()
 
@@ -635,6 +635,8 @@
         
         self.RefreshValues()
         self.VariablesGrid.RefreshButtons()
+        self.ControlPanelSizer.Layout()
+        self.MainSizer.Layout()
     
     def OnReturnTypeChanged(self, event):
         words = self.TagName.split("::")