Table of Contents

Interface ICustomListBox<TItem>

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

Interface for the custom list box control which extends IListControl<TItem> with multi-select and other features.

public interface ICustomListBox<TItem> : IListControl<TItem>, IControl, IDisposable, IWin32Window where TItem : class, new()

Type Parameters

TItem

Type of the item.

Properties

DelayedSelectionChangedInterval

Gets or sets default timeout interval (in msec) for timer that calls DelayedSelectionChanged event. If not specified, DefaultDelayedTextChangedTimeout is used.

HasBorder

Gets or sets a value indicating whether the control has a border.

IsSelectionModeMultiple

Gets or sets whether selection mode is Multiple

IsSelectionModeSingle

Gets or sets whether selection mode is Single

SelectedIndexes

Same as SelectedIndices.

SelectedIndices

Gets a collection that contains the zero-based indexes of all currently selected items in the control.

SelectedIndicesDescending

Gets a collection that contains the zero-based indexes of all currently selected items in the control.

SelectedItemTag

Gets 'Tag' property of the selected item if it is BaseObjectWithAttr.

SelectedItems

Gets a collection containing the currently selected items in the control.

SelectionMode

Gets or sets the method in which items are selected in the control.

Methods

CanRemoveSelectedItem()

Gets whether selected item can be removed.

GetValidIndexes(params int[])

Gets only valid indexes from the list of indexes in the control.

HasItems()

Gets whether control has items.

HasSelectedItems()

Gets whether control has selected items.

HitTest(PointD)

Returns the zero-based index of the item at the specified coordinates.

IsValidIndex(int)

Checks whether index is valid in the control.

RaiseSelectionChanged(EventArgs?)

Raises the SelectionChanged event and calls related method.

RemoveSelectedItem()

Removes selected item from the control.

RemoveSelectedItems()

Removes selected items from the control.

RunSelectedItemDoubleClickAction()

Runs action specified in the DoubleClickAction property of the selected item.

SelectItems(params int[])

Selects items with specified indexes in the control.

SelectedItemsAsText(string?)

Gets selected items as string.

SelectedItemsToClipboard(string?)

Copies result of the SelectedItemsAsText(string?) to clipboard.

SetSelected(int, bool)

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

Events

DelayedSelectionChanged

Occurs when the SelectedIndex, SelectedItem or the SelectedIndices have changed.

SelectedIndexChanged

Occurs when the SelectedIndex property has changed. Same as SelectionChanged, see it for the details.

SelectionChanged

Occurs when the SelectedIndex property or the SelectedIndices collection has changed.

SelectionModeChanged

Occurs when the value of the SelectionMode property changes.