Table 17 - 6 details the layout controls provided by the nGui framework.
Table 17-6
Class Description
Fill Creates a container that dynamically fills empty spaces.
HBox Creates a container that lays out its child objects side by side in a horizontal fashion.
VBox Creates a container that lays out its child objects side by side in a vertical fashion.
When using the layout container controls, you first need to work out how you would prefer the layout of
your GUI to appear. Once this has been decided, you then need to consider which formation would yield
the required results. This can sometimes be trial and error, as you can never truly guarantee that your
488
Part III: Extending the Possibilities
controls will sit where you would like them. For example, assuming you require a GUI containing three
rows of controls, each of which consists of a label on the left - hand side and a text field on the right, you
would most likely opt for one of the two layouts shown in Figure 17 - 2 .
As you can see, both layouts provide the same rough positioning for child controls.
Pages:
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906