%L_SELSTYLE

Retrieve/change the selection style for a list

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
oldstyle = %L_SELSTYLE(list_id[, newstyle])

or

xcall L_SELSTYLE(list_id[, newstyle])

Return value

oldstyle

The previous setting for the selection style. (^VAL)

Arguments

list_id

The ID of the list whose selection style you want to change. (n)

newstyle

(optional) The new selection style to apply to the list. One of the following (defined in tools.def): (n)

D_OFF

Do not change appearance of selected item.

D_ON

Highlight selected item. (default)

D_OUTLINE

Outline selected item.

Discussion

%L_SELSTYLE retrieves and/or changes the style for the selected item in a standard Toolkit list. (ActiveX lists ignore %L_SELSTYLE settings, but automatically have a bold frame when active.) Unless the list is part of a composite window, the default selection style, which is highlighting, is generally sufficient. However, if the list is part of a composite window, it’s difficult for users to tell when the list has focus. There’s no visual indication unless you change the selection style. The default method for child lists (C_METHLST), for example, sets the selection style to D_ON (highlighting) when the method is first invoked, and then sets it to D_OUTLINE right before returning.

Changes made with %L_SELSTYLE remain in effect, regardless of changes in focus, until a subsequent %L_SELSTYLE call changes the selection style again.

The oldstyle argument enables you to retrieve the current style for the list. If you also pass newstyle, the oldstyle argument retrieves the style that the list had before this function changed it.

If newstyle is omitted, no change is made to the selection style.

On UNIX and OpenVMS, D_OUTLINE has the same effect as D_ON (because outlining an item can occlude other items, headers, footers, and possibly other windows). Consider using L_ENABLE and L_DISABLE on these platforms instead of %L_SELSTYLE.

See also

Examples

See the ctrmeths.dbl file included in your UI Toolkit distribution. It includes code for the C_METHLST method, which uses %L_SELSTYLE.