Table of Contents

Method SetSelected

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

SetSelected(int, bool)

Selects or clears the selection for the specified item in a ListBox.

public virtual bool SetSelected(int index, bool value)

Parameters

index int

The zero-based index of the item in a ListBox to select or clear the selection for.

value bool

true to select the specified item; otherwise, false.

Returns

bool

Remarks

You can use this property to set the selection of items in a multiple-selection ListBox. To select an item in a single-selection ListBox, use the SelectedIndex property.

Exceptions

ArgumentOutOfRangeException

The specified index was outside the range of valid values.