Author: bugman Date: Mon Sep 9 16:45:37 2013 New Revision: 20928 URL: http://svn.gna.org/viewcvs/relax?rev=20928&view=rev Log: Merged revisions 20927 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r20927 | bugman | 2013-09-09 16:44:32 +0200 (Mon, 09 Sep 2013) | 3 lines The size of the model list GUI window can now be changed. ........ Modified: branches/relax_disp/ (props changed) branches/relax_disp/gui/analyses/elements/model_list.py Propchange: branches/relax_disp/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Mon Sep 9 16:45:37 2013 @@ -1,1 +1,1 @@ -/trunk:1-20922 +/trunk:1-20927 Modified: branches/relax_disp/gui/analyses/elements/model_list.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/analyses/elements/model_list.py?rev=20928&r1=20927&r2=20928&view=diff ============================================================================== --- branches/relax_disp/gui/analyses/elements/model_list.py (original) +++ branches/relax_disp/gui/analyses/elements/model_list.py Mon Sep 9 16:45:37 2013 @@ -39,6 +39,9 @@ """The model list GUI element.""" # Class variables. + border = 10 + """The border width, in pixels.""" + desc = None """The short description for the GUI element.""" @@ -47,6 +50,9 @@ params = [] """The list of parameters of each model in string form.""" + + size = (500, 300) + """The fixed size of the Window.""" warning = None """A warning string which if set will present a warning message to the user prior to allowing them to modify the list of models.""" @@ -79,7 +85,7 @@ self.select.append(True) # Initialise the model selection window. - self.model_win = Model_sel_window(self.models, self.params) + self.model_win = Model_sel_window(self.models, self.params, size=self.size, border=self.border) # Horizontal packing for this element. sizer = wx.BoxSizer(wx.HORIZONTAL) @@ -216,26 +222,27 @@ class Model_sel_window(wx.Dialog): """The model selector window object.""" - def __init__(self, models, params): + def __init__(self, models, params, size=None, border=None): """Set up the model selector window. - @param models: The list of models. - @type models: list of str - @param params: The list of parameters corresponding to the models. - @type params: list of str + @param models: The list of models. + @type models: list of str + @param params: The list of parameters corresponding to the models. + @type params: list of str + @keyword size: The fixed size of the Window. + @type size: tuple of int + @keyword border: The border width, in pixels. + @type border: int """ # Set up the dialog. wx.Dialog.__init__(self, None, id=-1, title="Model list selector") # Initialise some values - size_x = 500 - size_y = 300 - border = 10 - width = size_x - 2*border + width = size[0] - 2*border # Set the frame properties. - self.SetSize((size_x, size_y)) + self.SetSize(size) self.Centre() self.SetFont(font.normal)