This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Text widget, bindtags and Tabs
Type: Stage:
Components: Tkinter Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: alankar, gpolo, mkiever, skip.montanaro
Priority: normal Keywords:

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:05adminsetgithub: 34564
2008-05-15 16:53:49gpolosetstatus: open -> closed
nosy: + gpolo
resolution: not a bug
messages: + msg66870
2008-01-14 22:17:30mkieversetfiles: + 429031-tabs-nok.tcl
2008-01-14 22:17:13mkieversetfiles: + 429031-tabs-ok.tcl
2008-01-14 22:16:45mkieversetfiles: + 429031-tabs-nok.py
2008-01-14 22:16:14mkieversetfiles: + 429031-tabs-ok.py
messages: + msg59929
2008-01-14 20:35:31mkieversetnosy: + mkiever
2001-05-31 14:58:32alankarcreate