Exercises, examples and other material relating to training module T222. This topic is presented on public course
Tcl/Tk
Even a widget as simple as a label has some 20 different settings (also known as properties) that can affect its look and feel. Typically, the author of a Tk program will alter a minimum of these, as all resources have a default or "fallback" value. Users can override fallbacks through general setting files, and through files that include settings for specific applications. Programmers can give users the option of loading sets of resources from file as well. Resource setting is useful for applications which may be used by people with poor sight or who are colour blind, and also for giving a consistent look and feel to a group of related windows or applications.
Articles and tips on this subject | updated |
1474 | Using Tcl/Tk resource files for flexible applications If you're looking to write a Tcl/Tk application that can be flexibly configured, don't forget to use named resources. Here are two displays from the same program:
So - how did I get the difference in colour and text labels?
1. I drew the buttons WITHOUT ANY TEXT AT ALL, and I did NOT specify a background ... | 2007-12-18 |
Examples from our training material
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
[here].
Topics covered in this module
Introduction.
The resource hierarchy.
Loading the resource database.
Resource names.
Setting resources by class and widget type.
Resource priorities.
Other subcommands of option.
Design aspects, size etc..
User defined buttons.
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,
Ruby,
Lua,
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.