Exercises, examples and other material relating to training module T223. This topic is presented on public course Tcl/Tk
The Entry, text and listbox widgets provide a user data entry and edit capability which is highly configurable by the programmer - you can write a complete editor using a text widget if you like. ĘThis module covers the three text-ish widgets in detail.
|Articles and tips on this subject||updated|
|1475||Tcl/Tk - updating your display while tasks are running|
Let me make two statements:
1. When you are popping up a new window from your program, the very last thing you want to see happen is for the window to gradually appear, with bits of it being resized as it comes on the screen - not only is such an operation irritating on the eye, but also it's burning ...
|596||The magic of -textvariable|
If you're writing a GUI based application, you'll need to hold pertinent information in variables in your program, AND display that pertinent information to the user.
The obvious way of doing this is to provide code that updates the display as required - in the case of Tcl/Tk you might write
Examples from our training material
|form|| Form using Tk entry widget|
|form2|| Second form using Tk entry widget. |
|lbex|| Sample answer - listbox to choose types of fruit.|
|listbox1|| Tk listbox example|
|listbox2|| Tk second listbox example (code snippet only).|
|teditor|| Simple text editor in Tk|
|tkt|| A Tktable is a tabulator widget in Tcl/Tk|
|tktext|| a Tk text widget used as a vehicle for custom text editing|
|tktx2|| Marks and tags and editing in a Tk text widget|
|tktxt|| Tk - Text Widget - first easy example|
PicturesOn site training in Tk
Some modules are available for download
as a sample of our material or under an Open Training Notes License
for free download from http://www.training-notes.co.uk
Topics covered in this module
The listbox widget.
Scrolling a listbox.
The entry widget.
The text widget.
Text marks and tags.
Other operations on text widgets.
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule
Well House Consultants specialise in training courses in
. We run
throughout the UK (and beyond for longer courses), and
at our training centre in Melksham, Wiltshire, England.
It's surprisingly cost effective to come on our public courses -
even if you live in a different
country or continent to us
We have a technical library of over 700 books on the subjects on which we teach.
These books are available for reference at our training centre. Also
available is the Opentalk
Forum for discussion of technical questions.