Guilherme Polo <ggp...@gmail.com> added the comment:

> Martin v. Löwis added the comment:
>
> I can reproduce the problem. The root cause is that the "event generate .nb 
> <Control-Tab>" simply does not have any effect - neither through Python, nor 
> through directly wish. Nor do any of the other keys that supposedly cycle 
> through the notebook, when send through "event generate". Typing them 
> directly works fine.
>

Could it be caused because the notebook is not focused at the correct
time ? Here in OSX (finally I have one of these) I had to add
self.nb.focus() before that event_generate.

The attached patch is for trunk.

----------
keywords: +patch
Added file: http://bugs.python.org/file16818/p1.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8204>
_______________________________________
Index: Lib/lib-tk/test/test_ttk/test_widgets.py
===================================================================
--- Lib/lib-tk/test/test_ttk/test_widgets.py    (revision 79905)
+++ Lib/lib-tk/test/test_ttk/test_widgets.py    (working copy)
@@ -704,6 +704,7 @@
         self.nb.select(0)
 
         support.simulate_mouse_click(self.nb, 5, 5)
+        self.nb.focus()
         self.nb.event_generate('<Control-Tab>')
         self.assertEqual(self.nb.select(), str(self.child2))
         self.nb.event_generate('<Shift-Control-Tab>')
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to