commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r5791 - trunk/gnue-designer/src/base/tools


From: jcater
Subject: r5791 - trunk/gnue-designer/src/base/tools
Date: Sat, 8 May 2004 16:27:38 -0500 (CDT)

Author: jcater
Date: 2004-05-08 16:27:37 -0500 (Sat, 08 May 2004)
New Revision: 5791

Modified:
   trunk/gnue-designer/src/base/tools/PropertyEditor.py
Log:
added support for mouse-over tooltips on the property editor

Modified: trunk/gnue-designer/src/base/tools/PropertyEditor.py
===================================================================
--- trunk/gnue-designer/src/base/tools/PropertyEditor.py        2004-05-08 
18:53:22 UTC (rev 5790)
+++ trunk/gnue-designer/src/base/tools/PropertyEditor.py        2004-05-08 
21:27:37 UTC (rev 5791)
@@ -227,6 +227,23 @@
         else:
           field = TextEditor(self.fieldPanel,self.attributes[key])
 
+        # Generate a tooltip from the description.
+        # Note that tooltips can have {Name} tokens
+        try:
+          tt = self.attributes[key]['Description']
+          try:
+            for v, l in self.attributes[key]['ValueSet'].items():
+              tt = tt.replace('{%s}' % v, '"%s"' % l['Label'])
+          except KeyError:
+            pass
+          tt = tt.replace('{Y}','"True"')
+          tt = tt.replace('{N}','"False"')
+          tt = tt.replace('{','"')
+          tt = tt.replace('}','"')
+          field.SetToolTip(wxToolTip(tt))
+        except KeyError:
+          pass
+
         EVT_KILL_FOCUS(field, self.__valueModified)
         EVT_KEY_UP(field, self.__enterPressed)
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]