M
M
MK2015-07-15 19:20:29
Python
MK, 2015-07-15 19:20:29

How to cancel the default action (tkinter)?

The Tab button by default switches the focus on the elements, this is very annoying, how to make sure that nothing happens when you click on this button?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2015-07-15
@Maxsior

In the constructor of the form class or just somewhere during initialization, we make the following function:

def stop_tab(e):
  return("break")

Then we cling to the window:
Checked for 3.4 - it should work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question