ListView_SelectionSet()

Examples


The ListView_SelectionSet() function changes the selection in a list view field.

Syntax

ListView_SelectionSet(list_view_field, item_index {, mode})

Parameters

list_view_field – The list view field whose selection is being changed.

item_index – A long integer specifying the item that is being selected, added to the selection or removed from the selection. You can also use one of the following constants:

[spacer]

Constant

Description

LV_ALL

Specifies that all items will be selected.

LV_NONE

Specifies that no items will be selected.


mode – An optional integer parameter that is used for list view fields that allow multiple selections. The value corresponds to one of the following constants:

[spacer]

Constant

Description

LV_SELECTION_ADD

Adds the specified item to the current selection.

LV_SELECTION_REMOVE

Removes the specified item from the current selection.


If this parameter isn’t included, the selection is changed to include only the specified item.

Return value

A boolean indicating whether the selection was set. True indicates the selection was set, while false indicates it was not.

Comments

The selection changed script runs after the ListView_SelectionSet() function is executed.


Documentation Feedback