Skip to Content
Tkinter GUI Application Development Blueprints, Second Edition - Second Edition
book

Tkinter GUI Application Development Blueprints, Second Edition - Second Edition

by Bhaskar Chaudhary
March 2018
Beginner to intermediate
422 pages
10h 33m
English
Packt Publishing
Content preview from Tkinter GUI Application Development Blueprints, Second Edition - Second Edition

Focus-out validation mode demo

The previous example demonstrated validation in the key mode. This means that the validation method was called after every keypress to check whether an entry was valid.

However, there are situations where you might want to check the entire string entered into the widget rather than checking individual keystroke entries.

For example, when an Entry widget accepts a valid email address, we would ideally like to check the validity after the user has entered the entire email address and not after every keystroke entry. This will qualify for a validation in the focusout mode.

Check out 10.06_focus_out_validation.py for a demonstration of email validation in the focusout mode, which gives us the following GUI:

The ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Tkinter GUI Application Development Blueprints

Tkinter GUI Application Development Blueprints

Bhaskar Chaudhary

Publisher Resources

ISBN: 9781788837460Supplemental Content