Exercises, examples and other material relating to training module T221. This topic is presented on public course
Tcl/Tk
Tcl - the Tk Toolkit - The Graphic Application of Tcl through Tk
This course takes the programmer who's already
learnt to program in Tcl forward into the ... http://www.wellho.net/course/tkfull.html [course] |
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 ... http://www.wellho.net/mouth/1475_Tcl ... nning.html [short article] |
#!/usr/bin/wish
proc hit {within actual args} {
global currenthost currenttest
set runtest 0
switch $within {
... http://www.wellho.net/resources/ex.php4?item=t221/mb3 [code sample] |
#!/usr/bin/wish
# menu - first example
proc putshape {which} {
set x [expr int(rand()*320)]
set y [expr int(rand()*170)]
set ... http://www.wellho.net/resources/ex.php4?item=t221/mb1 [code sample] |
#!/usr/bin/wish
# menu buttons - showing extra options and flexibility
proc putshape {which} {
global pen boundary repmode
set x [expr ... http://www.wellho.net/resources/ex.php4?item=t221/mb2 [code sample] |
#!/usr/bin/wish
# During a long running process, there's often a need
# to update the display to keep the user informed.
# update idletasks is the command ... http://www.wellho.net/resources/ex.php4?item=t221/idletasks [code sample] |
http://www.wellho.net/pix/updateidletasks1.jpg [picture] |
In Tcl/Tk, you'll often want pull-down menu selection. Briefly, you'll use a menu bar which comprises a number of menus. Each menu will comprise a number of menu items, some of which may be submenus. And each menu item will have an action associated with it. In this module, you learn the mechanisms used to create menus, and you learn programming techniques to allow you to create a flexible, maintainable menu system too.
This topic is presented on public course
Tcl/Tk
Examples from our training material
| idletasks | use of update idle tasks to update the display |
| mb1 | First menu button |
| mb2 | Various options for menu buttons |
| mb3 | Menu bar system based on array or lists |
Background information
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
Simple pulldown menu.
Options for pulldown menus.
Menu bars.
Enhancements.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our
Listing and schedule page.
Well House Consultants specialise in training courses in
Tcl/Tk, Expect,
Python,
Perl,
PHP, and
MySQL. We run
Private Courses throughout the UK (and beyond for longer courses), and
Public Courses 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.