Author: bugman Date: Fri Jan 29 10:06:13 2010 New Revision: 10568 URL: http://svn.gna.org/viewcvs/relax?rev=10568&view=rev Log: Rearranged the contents of add_execute_relax(). Modified: branches/bieri_gui/gui_bieri/analyses/auto_model_free.py Modified: branches/bieri_gui/gui_bieri/analyses/auto_model_free.py URL: http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/analyses/auto_model_free.py?rev=10568&r1=10567&r2=10568&view=diff ============================================================================== --- branches/bieri_gui/gui_bieri/analyses/auto_model_free.py (original) +++ branches/bieri_gui/gui_bieri/analyses/auto_model_free.py Fri Jan 29 10:06:13 2010 @@ -95,23 +95,21 @@ @type box: wx.BoxSizer instance """ - # The elements. + # A horizontal sizer for the contents. + sizer = wx.BoxSizer(wx.HORIZONTAL) + + # The label. label = wx.StaticText(self.parent, -1, "Execute relax ", style=wx.ALIGN_RIGHT) - button = wx.BitmapButton(self.parent, -1, wx.Bitmap(IMAGE_PATH+'relax_start.gif', wx.BITMAP_TYPE_ANY)) - - # Properties. label.SetMinSize((118, 17)) label.SetFont(wx.Font(10, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Sans")) + sizer.Add(label, 0, wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 0) + + # The button. + button = wx.BitmapButton(self.parent, -1, wx.Bitmap(IMAGE_PATH+'relax_start.gif', wx.BITMAP_TYPE_ANY)) button.SetName('hello') button.SetSize(button.GetBestSize()) - - # Layout. - sizer = wx.BoxSizer(wx.HORIZONTAL) - sizer.Add(label, 0, wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 0) + self.gui.Bind(wx.EVT_BUTTON, self.automatic_protocol_controller, button) sizer.Add(button, 0, wx.RIGHT|wx.ADJUST_MINSIZE, 0) - - # Bind the events. - self.gui.Bind(wx.EVT_BUTTON, self.automatic_protocol_controller, button) # Add the element to the box. box.Add(sizer, 1, wx.ALIGN_RIGHT, 0)