Author: bugman Date: Fri Jun 10 09:43:01 2011 New Revision: 12950 URL: http://svn.gna.org/viewcvs/relax?rev=12950&view=rev Log: The auto model-free analysis frame now uses the base setup_analysis_element() method. Modified: 1.3/gui/analyses/auto_model_free.py Modified: 1.3/gui/analyses/auto_model_free.py URL: http://svn.gna.org/viewcvs/relax/1.3/gui/analyses/auto_model_free.py?rev=12950&r1=12949&r2=12950&view=diff ============================================================================== --- 1.3/gui/analyses/auto_model_free.py (original) +++ 1.3/gui/analyses/auto_model_free.py Fri Jun 10 09:43:01 2011 @@ -152,6 +152,7 @@ self.offset(-self.offset()) + class Auto_model_free(Base_frame): def __init__(self, gui, notebook): """Build the automatic model-free protocol GUI element. @@ -187,12 +188,11 @@ # The parent GUI element for this class. self.parent = wx.Panel(notebook, -1) + # Build the central sizer, with borders. + box = self.setup_analysis_element(self.parent) + # Build and pack the main sizer box, then add it to the automatic model-free analysis frame. - main_box = self.build_main_box() - self.parent.SetSizer(main_box) - - # Set the frame font size. - self.parent.SetFont(self.gui.font_small) + self.build_main_box(box) def _about(self, event): @@ -699,15 +699,12 @@ event.Skip() - def build_main_box(self): + def build_main_box(self, box): """Construct the highest level box to pack into the automatic model-free analysis frame. - @return: The main box element containing all model-free GUI elements to pack directly into the automatic model-free analysis frame. - @rtype: wx.BoxSizer instance - """ - - # Use a horizontal packing of elements. - box = wx.BoxSizer(wx.HORIZONTAL) + @param box: The horizontal box element to pack the elements into. + @type box: wx.BoxSizer instance + """ # Build the left hand box. left_box = wx.BoxSizer(wx.VERTICAL) @@ -739,18 +736,18 @@ button_sizer.Add(button, 0, 0, 0) left_box.Add(button_sizer, 0, wx.ALL, 0) - # Spacer. + # Bottom spacer. left_box.AddSpacer(10) # Add to the main box. box.Add(left_box, 0, wx.ADJUST_MINSIZE, 0) + + # Central spacer. + box.AddSpacer(self.border) # Build the right hand box and pack it next to the bitmap. right_box = self.build_right_box() box.Add(right_box, 1, 0, 0) - - # Return the box. - return box def build_right_box(self):