Tricks with boxes

In this section:

The %ob (Open Box) format has a number of uses. Consider what happens if you use %3.4ob[invisible]. In this case the grid structure will be invisible, but the contents of the various cells will still be laid out in a rectangular pattern.

Boxes can be nested, so some or all of the entries in this lattice can also be boxes.

Invisible boxes can be used to create groupings of controls. For example, suppose you had a format string such as:

"%10.3ls%bt[Case 1]%nl%bt[Case 2]%nl%bt[Case 3]%nl%bt[Case 5]"

Because the list box is not very deep, it is quite likely that the first one or two buttons would appear to the right of the list box, while the rest would be separated underneath the box. Obviously you could solve the problem by right justifying all the buttons, but that might not be what was required. A better solution is to surround the buttons with an invisible box.

While you are developing a window it may be a good idea to make all boxes visible, so as to understand the layout. When everything is right you can add the invisible option to the %ob format.

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited