mailr14211 - /branches/gui_testing/gui/analyses/spin_ctrl.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on August 06, 2011 - 20:52:
Author: bugman
Date: Sat Aug  6 20:52:50 2011
New Revision: 14211

URL: http://svn.gna.org/viewcvs/relax?rev=14211&view=rev
Log:
Some fixes for the new Spin_ctrl analysis object.


Modified:
    branches/gui_testing/gui/analyses/spin_ctrl.py

Modified: branches/gui_testing/gui/analyses/spin_ctrl.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/spin_ctrl.py?rev=14211&r1=14210&r2=14211&view=diff
==============================================================================
--- branches/gui_testing/gui/analyses/spin_ctrl.py (original)
+++ branches/gui_testing/gui/analyses/spin_ctrl.py Sat Aug  6 20:52:50 2011
@@ -69,7 +69,10 @@
         sizer = wx.BoxSizer(wx.HORIZONTAL)
 
         # The label.
-        self.label = self.add_static_text(sizer, parent, text=text, 
width=width_text)
+        self.label = wx.StaticText(parent, -1, text)
+        self.label.SetMinSize((width_text, -1))
+        self.label.SetFont(font.normal)
+        sizer.Add(self.label, 0, wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 
0)
 
         # The size for all elements, based on this text.
         size = self.label.GetSize()
@@ -81,7 +84,7 @@
         # The spin control.
         self.control = control(parent, -1, text, min=min, max=max)
         self.control.SetFont(font.normal)
-        box.Add(self.control, 1, wx.ALIGN_CENTER_VERTICAL, 0)
+        sizer.Add(self.control, 1, wx.ALIGN_CENTER_VERTICAL, 0)
 
         # Spacer.
         sizer.AddSpacer((spacer, -1))
@@ -89,13 +92,13 @@
         # No button, so add a spacer.
         sizer.AddSpacer((width_button, -1))
 
-        # Add the element to the box.
-        box.Add(sizer, 0, wx.ALL|wx.EXPAND, 0)
-
         # Tooltip.
         if tooltip:
             self.label.SetToolTipString(tooltip)
             self.control.SetToolTipString(tooltip)
+
+        # Add the element to the box.
+        box.Add(sizer, 0, wx.ALL|wx.EXPAND, 0)
 
 
     def Enable(self, enable=True):




Related Messages


Powered by MHonArc, Updated Sat Aug 06 21:00:02 2011