commit-gnue
[Top][All Lists]
Advanced

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

[gnue] r8688 - trunk/gnue-forms/src/GFObjects


From: reinhard
Subject: [gnue] r8688 - trunk/gnue-forms/src/GFObjects
Date: Thu, 14 Sep 2006 10:24:08 -0500 (CDT)

Author: reinhard
Date: 2006-09-14 10:24:08 -0500 (Thu, 14 Sep 2006)
New Revision: 8688

Modified:
   trunk/gnue-forms/src/GFObjects/GFEntry.py
Log:
Prepared focus-in and focus-out procedures for GFEntry (not used yet).


Modified: trunk/gnue-forms/src/GFObjects/GFEntry.py
===================================================================
--- trunk/gnue-forms/src/GFObjects/GFEntry.py   2006-09-14 15:06:17 UTC (rev 
8687)
+++ trunk/gnue-forms/src/GFObjects/GFEntry.py   2006-09-14 15:24:08 UTC (rev 
8688)
@@ -177,6 +177,48 @@
 
 
     # -------------------------------------------------------------------------
+    # Focus in and out
+    # -------------------------------------------------------------------------
+
+    def focus_in(self):
+        """
+        Notify the entry that it has received the focus.
+        """
+
+        self.processTrigger('PRE-FOCUSIN')
+        self.processTrigger('POST-FOCUSIN')
+
+    # -------------------------------------------------------------------------
+
+    def validate(self):
+        """
+        Validate the entry to decide whether the focus can be moved away from
+        it.
+
+        This function can raise an exception, in which case the focus change
+        will be prevented.
+
+        Calling this function will implicitly update the value in the
+        associated GFField object.
+        """
+
+        self.processTrigger('PRE-FOCUSOUT')
+
+
+    # -------------------------------------------------------------------------
+
+    def focus_out(self):
+        """
+        Notify the entry that it is going to lose the focus.
+
+        The focus change is already decided at this moment, there is no way to
+        stop the focus from changing now.
+        """
+
+        self.processTrigger('POST-FOCUSOUT')
+
+
+    # -------------------------------------------------------------------------
     # Begin/end editing mode for this entry
     # -------------------------------------------------------------------------
 





reply via email to

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