Issue 429031: Text widget, bindtags and Tabs (original) (raw)

Created on 2001-05-31 14:58 by alankar, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
tabs.py alankar,2001-05-31 14:58 None
tabs.py alankar,2001-05-31 15:00 Tab eating text widget
429031-tabs-ok.py mkiever,2008-01-14 22:16 python bindtags call with tabs ok
429031-tabs-nok.py mkiever,2008-01-14 22:16 python bindtags with tabs not ok
429031-tabs-ok.tcl mkiever,2008-01-14 22:17 tcl bindtags with tabs ok
429031-tabs-nok.tcl mkiever,2008-01-14 22:17 tcl bindtags with tabs not ok
Messages (4)
msg4914 - (view) Author: Alankar Misra (alankar) Date: 2001-05-31 14:58
While using a Text widget, if I were to swap the first two default elements in the bindtags tuple (text._w,'Text') swapped to ('Text',text._w), ie the Text widget now recieves all the key events before a bound event handler does, the Text widget will eat up Tabs and the event handler will never be called. The attached py file demonstrates just that. It works with all the other keys, why not tabs?
msg4915 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2002-03-10 01:20
Logged In: YES user_id=44345 setting the category. seems sort of like a Tk issue to me, not a Tkinter issue.
msg59929 - (view) Author: Matthias Kievernagel (mkiever) * Date: 2008-01-14 22:16
skip was right. An equivalent tcl program shows the same behaviour. Tested with tcl/tk 8.4.6 Corrected python scripts (the original attached files were broken) and equivalent tcl scripts attached. Matthias Kievernagel
msg66870 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2008-05-15 16:53
The "tab" key is bound globally to move the focus to the next widget, but that is not what you would want for a text widget. So, text widgets breaks the natural flow of tab key events to achieve this, and, when you specify bindings like that (in your "not ok" example), it stops your widget-level binding from firing. I don't see anything to be fixed here, so I'm closing it.
History
Date User Action Args
2022-04-10 16:04:05 admin set github: 34564
2008-05-15 16:53:49 gpolo set status: open -> closednosy: + gpoloresolution: not a bugmessages: +
2008-01-14 22:17:30 mkiever set files: + 429031-tabs-nok.tcl
2008-01-14 22:17:13 mkiever set files: + 429031-tabs-ok.tcl
2008-01-14 22:16:45 mkiever set files: + 429031-tabs-nok.py
2008-01-14 22:16:14 mkiever set files: + 429031-tabs-ok.pymessages: +
2008-01-14 20:35:31 mkiever set nosy: + mkiever
2001-05-31 14:58:32 alankar create