Modifying the Appearance of the Choice List Window

Each choice list has its own window. The size, location, and border of the choice list window is defined in the cl_def() call. Defaults are set for window attribute (LCLINACT) and right and left column margins (one).

The window for any particular choice list is accessed with:

clistp->wnp

You can use any of the set window functions to change the appearance of the choice list window. For example, to print a title in the border of the choice list window for the font menu, use the following line of code:

sw_title("Fonts", LCLINACT, TOPLEFT, clistp->wnp);

The set window functions for changing appearance of windows are discussed in Chapter 25, "Changing the Appearance of Windows."

Changing the Margins on a Choice List Window

You can change the default margins on a choice list window in one of two ways. First, you can change the margins on the default choice list window CLIST_WNP. Alternatively, you can change the margins on an individual choice list window. The function used to change margins is sw_mg(). See Chapter 25, "Changing the Appearance of Windows," for more information about this function.

There is an extra step in changing the margins on choice list windows. After you change the margins, you must change the length of the choice list highlight bar to account for the new margins. The choice list highlight bar must not extend into the margin area. Use the function scl_itemlen() to change the highlight bar length.


Home Contents Previous Next