mailr20401 - in /branches/relax_disp: ./ gui/analyses/elements/bool_element.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on July 18, 2013 - 20:17:
Author: bugman
Date: Thu Jul 18 20:17:49 2013
New Revision: 20401

URL: http://svn.gna.org/viewcvs/relax?rev=20401&view=rev
Log:
Merged revisions 20400 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r20400 | bugman | 2013-07-18 20:17:10 +0200 (Thu, 18 Jul 2013) | 3 lines
  
  The boolean GUI auto-analysis input element now has a SetValue() method.
........

Modified:
    branches/relax_disp/   (props changed)
    branches/relax_disp/gui/analyses/elements/bool_element.py

Propchange: branches/relax_disp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Jul 18 20:17:49 2013
@@ -1,1 +1,1 @@
-/trunk:1-20398
+/trunk:1-20400

Modified: branches/relax_disp/gui/analyses/elements/bool_element.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/analyses/elements/bool_element.py?rev=20401&r1=20400&r2=20401&view=diff
==============================================================================
--- branches/relax_disp/gui/analyses/elements/bool_element.py (original)
+++ branches/relax_disp/gui/analyses/elements/bool_element.py Thu Jul 18 
20:17:49 2013
@@ -142,6 +142,26 @@
         return self.state
 
 
+    def SetValue(self, value):
+        """Set the value of the control.
+
+        @param value:   The value to set the boolean control to.
+        @type value:    bool
+        """
+
+        # True.
+        if value == True:
+            self.field.SetValue('True')
+            
self.button.SetBitmapLabel(wx.Bitmap(fetch_icon('oxygen.actions.media-record-relax-green'),
 wx.BITMAP_TYPE_ANY))
+            self.state = True
+
+        # False:
+        else:
+            self.field.SetValue('False')
+            
self.button.SetBitmapLabel(wx.Bitmap(fetch_icon('oxygen.actions.media-record'),
 wx.BITMAP_TYPE_ANY))
+            self.state = False
+
+
     def toggle(self, event=None):
         """Switch the state."""
 




Related Messages


Powered by MHonArc, Updated Thu Jul 18 20:20:10 2013