dabo Commit
Revision 4457
Date: 2008-08-26 18:46:42 -0700 (Tue, 26 Aug 2008)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/4457

Changed:
U   trunk/dabo/ui/uiwx/dControlMixin.py

Log:
[3996] and [3998] added property TabStop, which when True allows focus to the
control (the default). However, I've run into oddities when creating panels 
with some controls with TabStop=False. Turns out, I was calling Navigate()
without a needed argument, the event needs to be skipped, and the Navigate()
needs to be done in a callAfter().

I love these bug-fixing days. TabStop rocks now!



Diff:
Modified: trunk/dabo/ui/uiwx/dControlMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dControlMixin.py 2008-08-26 22:15:23 UTC (rev 4456)
+++ trunk/dabo/ui/uiwx/dControlMixin.py 2008-08-27 01:46:42 UTC (rev 4457)
@@ -31,11 +31,10 @@
        def __onWxNavKey(self, evt):
                # A navigation key event has caused this control to want to 
                # get the focus. Only allow it if self.TabStop is True.
+               evt.Skip()
                if not self.TabStop:
-                       self.Parent.Navigate()
-               else:
-                       evt.Skip()
-               
+                       dabo.ui.callAfter(self.Navigate, evt.GetDirection())
+       
 
        def _getTabStop(self):
                return getattr(self, "_tabStop", True)




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to