Author: reinhard
Date: 2006-10-19 07:27:35 -0500 (Thu, 19 Oct 2006)
New Revision: 8870

Modified:
   trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py
Log:
Accept mouse clicks on grid lines only when the underlying entry is enabled.


Modified: trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py        2006-10-19 
12:14:27 UTC (rev 8869)
+++ trunk/gnue-forms/src/uidrivers/wx26/widgets/entry.py        2006-10-19 
12:27:35 UTC (rev 8870)
@@ -230,15 +230,18 @@
                 other = item._gnue_label_
 
             if other == label:
-                # adjust the record number if necessary
                 lookup = item
-                if 'wxMac' in wx.PlatformInfo and self._gfObject.style == 
'dropdown':
+                if 'wxMac' in wx.PlatformInfo \
+                        and self._gfObject.style == 'dropdown':
                     lookup = lookup.GetParent()
 
-                # This replaces the label with the actual entry and sets the
-                # focus on the entry
-                self._ui_set_focus_(self.widgets.index(lookup))
+                if lookup.IsEnabled():
+                    # This replaces the label with the actual entry and sets
+                    # the focus on the entry
+                    self._ui_set_focus_(self.widgets.index(lookup))
 
+                break
+
         event.Skip()
 
     # -------------------------------------------------------------------------



_______________________________________________
commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue

Reply via email to