next up previous
Next: Creating windows Up: An introduction to Previous: Frames

Widget paths

 

All widgets in an application form a hierarchy. The path of a widget is the path you have to follow from the root of the hierarchy to that widget.

Consider the hierarchy of figure 4, which is the hierarchy belonging to figure 3. (The reason why the text of button 2 is not visible is that there's just no room since button 3 and button 4 are taking all the available space.)

  
Figure 4: Hierarchy of a simple Tcl/Tk application

The path of a widget determines the widget 'tree' it is contained in. In the example, the paths of button 3 and button 4 are .f2.b3 and .f2.b4 respectively, thus both being contained in frame 2.



SE Praktikum
Tue Aug 13 13:33:30 MET DST 1996