Manually Sizing and Placing the Choice List Window

You have the option of sizing and placing the choice list yourself. If you specify CLMANUAL as one of the options when creating your choice list, you are completely responsible for ensuring that the window is properly sized to hold the choice list and that the window is appropriately placed on the form. If you are implementing a multiple selection (CLMULTIPLE) choice list, you must add two extra characters to the column dimensions of the choice list window: one character to hold the marking character (a checkmark, by default) and a space to separate it from the choice list item text.

Designer: If you turn the CLMANUAL option ON in the Designer, you must specify the size and placement of the choice list window before leaving the Choice List dialog box. You can also change the choice list options in your code, by calling scl_opt().

Code: If you turn the CLMANUAL option ON in your code, you are responsible for sizing and placing the window before the choice list is displayed.

A pointer to the window for the choice list is contained in the choice list structure. To access the window, use:

(fld_clistp(fldp))->wnp

To modify the size and location of the choice list window, use:

wn_mod(rb, cb, rowq, colq, (fld_clistp(fldp))->wnp)

To modify just the location of the choice list window, use:

wn_mv(rb, cb, (fld_clistp(fldp))->wnp)

Refer to Chapter 25, "Changing the Appearance of Windows," if you need more information about sizing and placing windows.


Home Contents Previous Next