Chaining the <tt>subwidget</tt> Method<A NAME=134> </A>

Next: Configuring Subwidget Options Up: Accessing The Components Previous: The subwidget Method

### Chaining the `subwidget` Method

Some Tix mega-widgets may have subwidgets that in turn contain subwidgets. For example, the TixExFileSelectDialog (section 5.1.3) widget contains a TixExFileSelectBox subwidget called `fsbox`, which in turn contains a TixComboBox (section 1.4) subwidget called `dir`. If we want to access the `dir` subwidget, we can just ``chain'' the `subwidget` method. For example, if we have a TixExFileSelectDialog called `.file`, the following command will return the pathname of the `dir` subwidget of the `fsbox` subwidget of `.file`:

> `.file subwidget fsbox subwidget dir`

Moreover, the following command configures the `dir` subwidget to have a border of the groove type with a border width of 2 pixels:

> `.file subwidget fsbox subwidget dir configure -bd 2 -relief groove`

The chaining of the subwidget command can be applied for arbitrarily many levels, depending whether your widget has a subwidget that has a subwidget that has a subwidget that has a subwidget ... and so on.