Table of Contents

Class StdListBox

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

Represents a control to display a list of items. This control is derived from VirtualListBox. It is implemented inside the library and doesn't use native list box control.

[ControlCategory("Common")]
public class StdListBox : VirtualListBox, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IDisposableObject, IBaseObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, INotifyDataErrorInfo, IReadOnlyStrings, IListControlItemContainer, IListControlItemDefaults, ICheckListBox<ListControlItem>, ICustomListBox<ListControlItem>, IListControl<ListControlItem>, IListControl, IScrollEventRouter, IListBoxActions, ICustomListBox<object>, IListControl<object>, IControl, IDisposable, IWin32Window, ILayoutItem
Inheritance
StdListBox
Implements
Derived

Remarks

The StdListBox control enables you to display a list of items to the user that the user can select by clicking. A StdListBox control can provide single or multiple selections using the SelectionMode property. The BeginUpdate() and EndUpdate() methods enable you to add a large number of items to the ListBox without the control being repainted each time an item is added to the list. The Items, SelectedItems, and SelectedIndices properties provide access to the three collections that are used by the control.

Constructors

StdListBox()

Initializes a new instance of the StdListBox class.

StdListBox(Control)

Initializes a new instance of the StdListBox class with the specified parent control.

Properties

BaseItems

Gets or sets items as collection ListControlItem items. This is the fastest way to access items.

FirstItem

Gets first item in the control or null if there are no items.

this[int]

Gets or sets the Items element at the specified index.

this[long]

Gets or sets the Items element at the specified index.

this[int?]

Gets or sets the Items element at the specified index.

Items

Gets or sets items.

LastItem

Gets last item in the control or null if there are no items.

LastRootItem

Gets last root item in the control or null if there are no items.

SelectedItem

Gets or sets the currently selected item in the control.

SelectedItems

Gets an array of the selected items.

SelectedItemsCollection

Gets a collection of the selected items.

Methods

Add(object)

Adds an object to the end of the Items collection.

DataToItem(object?)

Finds the item with the specified data.

GetItem(int)

Gets item with the specified index.

ItemToData(ListControlItem?)

Gets data associated with the item.

SetCount(int, Func<object>)

Changes the number of elements in the Items.

SetItem(int, object)

Sets item with the specified index.

SetItemData(ListControlItem?, object?)

Sets item data.