
Output of text_form.c
Notice that the Labels are centered vertically with respect to their corresponding Text widgets. This arrangement
happened because each Label was stretched vertically in order to attach it to the top and bottom of the respective
Form. Of course, if the Labels were higher than the Text widgets, the Text widgets would be stretched instead.
Later, we'll show another version of this program that gives better results. As you can imagine, there are many
different ways for a Form, or any other manager widget, to manage the geometry of its children to produce the same
layout. Later, when we discuss the RowColumn widget, we will show you another solution to the problem of
horizontal alignment. It is important to remember that there is no right or wrong way to create a layout, as long as it
works for your application. However, you should be very careful to experiment with resizing issues as well as with
resources that can be set by the user that might affect widget layout, such as fonts and strings.
9.4.6 Common Problems
With a Form widget, you can specify a virtually unlimited number of attachments for its children. The dependencies
inherent in these attachments can lead to various errors in the layout of the widgets. One common problem involves
circular dependencies. The following code fragment shows a very simple example of a circular dependency:
w1 = XtVaCreateManagedWidget ...