Table of Contents

SELECTIONSTYLE property (Listbox)

Description

Specifies whether items in a ListBox control are drawn using the classic ListBox style (solid color) or the TreeView style (lighter fill color with a border).

ListBox style

TreeView style

Property Value

A numeric value that describes how the items in the ListBox should be drawn.

ValueDescription
0Use the default settings for the renderer.
1Paint non-header items in the normal ListBox style.
2Paint the non-header items using a TreeView style (if supported by the renderer).

Property Traits

DevelopmentRuntimeIndexedScaledSynthetic
Get/SetGet/SetNoNoNo

Remarks

Not all renderers support a TreeView style that is different from the ListBox style, therefore the SELECTIONSTYLE property has no effect when using the following:

• CLASSIC renderer

• AERO renderer

Equated constants for this property can be found in the PS_LISTBOX_EQUATES insert record.

Example

 
Declare Subroutine Set_Property_Only

   $Insert PS_ListBox_Equates

   

   // Example - ensure that the LST_CONTROLS ListBox always

   // uses the ListBox style regardless of the renderer.

   

   Set_Property_Only( @Window : ".LST_CONTROLS", "SELECTIONSTYLE", LBRS_LISTBOX$ )
 
 
 
 
 

See Also

SYSTEM VISUALSTYLE property, WINDOW VISUALSTYLE property