2.5 Windows and Widgets

revised 30 July 2006
Google site search

ContentsIntroductionBasicIntermediateAdvancedFuturePolicyInfrastructure
The Using aText Editor exercise is a practical introduction to the more general concepts of widgets and bindings. In this exercise a more developed text editor i.e. word processor, can be used with menu cascades and hot keys as a way to extend and generalise the concept of widget. Have the student describe all the widgets that are used in your text editor, including those used in the menu functions, such as file open and save dialogues. These dialogues are examples of independant child windows. Note that the tcl Text Editor uses the standard system dialogues for file operations and not ones specially built in tcl. This borrowing of properties from the operation environment is an example of native look and feel. Note the different kind of window that the window manager provides for child dialogue boxes.

From the perspective of the text editor, move out to the desktop, which is the screen space within which everything else is laid out. Identify areas of the desktop, program icons, active programs, shortcut icons and so on. Use to see the properties of an objet on the desktop. (Right-click is generally used to access information about something as opposed to making something happen. This is a principle to be born in mind.)

Look at a selected number of programs which use various kinds of widgets, radio buttons, canvas, dials and so on. Note that all windows are rectangular. Why is this?

Describe concepts such as: desktop, icon, frame, window, dialogue, title bar, handles, menu bar, help, button, cascade, entry and text widget.

Describe functions such as: close, restore, maximise, minimise, stretch, expand, focus, select (word, line, paragraph), use of select binding keys and <Cntrl>, copy, paste, delete, insert, move, drag-and-drop.

How to recognise and use some of the more complex widgets and their builtin behaviours:


Assessment - Write a list of widget types covered in the lesson. This requires that a careful list be made up from the program(s) used to illustrate widgets. Watch out for such exotic widgets as colour selection dialogue, tear off menu, toolbar, flyout etc. Image Painting programs contain many types of widgets and may be best left for a second lesson.
Exercise 1 Compile a list of widget types that are used in a well-known program useful for this exercise.

Exercise 2 Design a standard test for a badge which signifies comtepence in this aspect that can be applied for 5-9 year olds or some specifc age within that range.

Exercise 3 (Advanced) Write a program which illustrates the menagerie of widgets and in one mode tells you the name of the widget on mouseover and how it works, in a second mode asks you to select the name of the widget from a list.
Prev Next

©2000 - 2006 WEBSCOOL This page last updated 31 Jul 2006. All rights reserved - including copying or distribution of any portion of this document in any form or on any medium without authorisation. For more regarding the copyright.