Next | Prev | Up | Top | Contents | Index

Widget Names

Tcl is a text-based language--the only data type is string-- so it works well to describe widgets organized in a hierarchical structure. The naming of objects within the widget hierarchy is similar to absolute pathnames of system files, with a dot (.) replacing the slash (/) for pathnames. The application itself is known as "." or dot. An xmForm widget within the application might be known as .form1, while an xmLabel widget within this form might be known as .form1.okLabel, and so on.

Note that Xt requires that "." can have only one child (except for dialog boxes, which are not mapped inside their parents). Tcl Motif follows this naming convention.


Next | Prev | Up | Top | Contents | Index