Author: bugman Date: Sat May 5 21:04:52 2012 New Revision: 15999 URL: http://svn.gna.org/viewcvs/relax?rev=15999&view=rev Log: The read_only flag now is fully functional in the String_list wizard page element. Modified: branches/uf_redesign/gui/wizard_elements.py Modified: branches/uf_redesign/gui/wizard_elements.py URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/wizard_elements.py?rev=15999&r1=15998&r2=15999&view=diff ============================================================================== --- branches/uf_redesign/gui/wizard_elements.py (original) +++ branches/uf_redesign/gui/wizard_elements.py Sat May 5 21:04:52 2012 @@ -317,10 +317,13 @@ self._field = wx.TextCtrl(parent, -1, '') self._field.SetMinSize((50, parent.height_element)) self._field.SetFont(font.normal) - self._field.SetEditable(False) - colour = parent.GetBackgroundColour() - self._field.SetOwnBackgroundColour(colour) sub_sizer.Add(self._field, 1, wx.ADJUST_MINSIZE|wx.ALIGN_CENTER_VERTICAL, 0) + + # Read-only. + if read_only: + self._field.SetEditable(False) + colour = parent.GetBackgroundColour() + self._field.SetOwnBackgroundColour(colour) # A little spacing. sub_sizer.AddSpacer(5) @@ -350,7 +353,7 @@ # Initialise the combo list input field. elif self.element_type == 'combo_list': - self._field = Combo_list(parent, sizer, desc, n=combo_list_size, choices=combo_choices, tooltip=tooltip) + self._field = Combo_list(parent, sizer, desc, n=combo_list_size, choices=combo_choices, tooltip=tooltip, read_only=read_only) # Unknown field. else: