Author: bugman Date: Thu Jun 9 13:05:45 2011 New Revision: 12917 URL: http://svn.gna.org/viewcvs/relax?rev=12917&view=rev Log: Created the add_subsubtitle() base class method for creating a sub-sub-title. Modified: 1.3/gui/analyses/base.py Modified: 1.3/gui/analyses/base.py URL: http://svn.gna.org/viewcvs/relax/1.3/gui/analyses/base.py?rev=12917&r1=12916&r2=12917&view=diff ============================================================================== --- 1.3/gui/analyses/base.py (original) +++ 1.3/gui/analyses/base.py Thu Jun 9 13:05:45 2011 @@ -31,6 +31,47 @@ class Base_frame: """The base class for all frames.""" + def add_subtitle(self, box, text): + """Create and add the subtitle. + + @param box: The box element to pack the subtitle into. + @type box: wx.BoxSizer instance + @param text: The text of the subtitle. + @type text: str + """ + + # The title. + label = wx.StaticText(self.parent, -1, text) + + # The font properties. + label.SetFont(self.gui.font_subtitle) + + # Add the subtitle to the box, with spacing. + box.AddSpacer(20) + box.Add(label) + box.AddSpacer(5) + + + def add_subsubtitle(self, box, text): + """Create and add the subsubtitle. + + @param box: The box element to pack the text into. + @type box: wx.BoxSizer instance + @param text: The text of the subsubtitle. + @type text: str + """ + + # The text. + label = wx.StaticText(self.parent, -1, text) + + # The font properties. + label.SetFont(self.gui.font_normal) + + # Add the text to the box, with spacing. + box.AddSpacer(10) + box.Add(label) + + def add_title(self, box, text): """Create and add the frame title. @@ -50,24 +91,3 @@ box.AddSpacer(10) box.Add(label) box.AddSpacer(5) - - - def add_subtitle(self, box, text): - """Create and add the subtitle. - - @param box: The box element to pack the subtitle into. - @type box: wx.BoxSizer instance - @param text: The text of the subtitle. - @type text: str - """ - - # The title. - label = wx.StaticText(self.parent, -1, text) - - # The font properties. - label.SetFont(self.gui.font_subtitle) - - # Add the subtitle to the box, with spacing. - box.AddSpacer(20) - box.Add(label) - box.AddSpacer(5)