Layout and positioning

In this section:

Format windows, created using winio@, contain text and child windows called controls. Text and controls are presented in the order in which they appear in the format string. ClearWin+ automatically positions the text and controls in a window and adjusts the size of the window to suit its contents. This automatic positioning provides for a standard blank border within the window. This border surrounds all the text and controls. It can be removed by using %ww (Window Style) together with its no_border option.

Text and controls in a format string can be separated by one or more of the following format codes.

%nl (Newline)

gives a new line

%ta (Next Tabstop)

advances to the next tab position

%ff (Form Feed)

advances to the left margin below any existing controls

%cn (Centre)

centres text and controls on the current line

%rj (Right Justify)

right justifies text and controls on the current line


%ta (Next Tabstop) and %nl (Newline) can be used with an integer modifier. For example, %2nl gives two new lines.

It is important to note that, if these codes appear within a %ob (Open Box) box, then the effect relates to the box rather than the window as a whole. Moreover, %ob (Open Box) boxes can be nested. As a result it is possible to exercise a fine control over the positioning of items within a window. In extreme cases, there are other mechanisms for adjusting the position of a given item.

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited