Author: bugman Date: Tue Jun 28 22:10:12 2011 New Revision: 13262 URL: http://svn.gna.org/viewcvs/relax?rev=13262&view=rev Log: Created a generic base class method build_left_box() to replace all of the specific analysis ones. Modified: branches/gui_testing/gui/analyses/base.py Modified: branches/gui_testing/gui/analyses/base.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/base.py?rev=13262&r1=13261&r2=13262&view=diff ============================================================================== --- branches/gui_testing/gui/analyses/base.py (original) +++ branches/gui_testing/gui/analyses/base.py Tue Jun 28 22:10:12 2011 @@ -389,6 +389,34 @@ box.AddSpacer(5) + def build_left_box(self): + """Construct the left hand box to pack into the automatic Rx analysis frame. + + @return: The left hand box element containing the bitmap. + @rtype: wx.BoxSizer instance + """ + + # Use a vertical packing of elements. + box = wx.BoxSizer(wx.VERTICAL) + + # Convert the bitmap names to a list. + if type(self.bitmap) != list: + bitmaps = [self.bitmap] + else: + bitmaps = self.bitmap + + # Add the bitmaps. + for i in range(len(bitmaps)): + # The bitmap. + bitmap = wx.StaticBitmap(self.parent, -1, wx.Bitmap(bitmaps[i], wx.BITMAP_TYPE_ANY)) + + # Add it. + box.Add(bitmap, 0, wx.ADJUST_MINSIZE, 10) + + # Return the box. + return box + + def build_main_box(self, box): """Construct the highest level box to pack into the automatic analysis frames.