Table of Contents

Class VirtualListBox

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

ListBox descendant with advanced formatting for the items. Please use ListControlItem with this control.

public class VirtualListBox : ListBox, IBaseObject, IDisposableObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, INotifyDataErrorInfo, IReadOnlyStrings
Inheritance
VirtualListBox
Implements
Derived

Constructors

VirtualListBox()

Initializes a new instance of the VirtualListBox class.

Fields

DefaultCurrentItemBorder

Gets or sets default current item border.

DefaultDisabledItemTextColor

Gets or sets default disabled item text color.

DefaultItemMargin

Gets or sets default item margin.

DefaultItemTextColor

Gets or sets default item text color.

DefaultMinItemHeight

Gets or sets default minimal item height.

DefaultSelectedItemBackColor

Gets or sets default selected item background color.

DefaultSelectedItemTextColor

Gets or sets default selected item text color.

Properties

CheckBoxAllowAllStatesForUser

Gets or sets whether user can set the checkboxes to the third state by clicking.

CheckBoxThreeState

Gets or sets a value indicating whether checkbox will allow three check states rather than two.

CheckBoxVisible

Gets or sets whether to show checkboxes in the items.

CheckOnClick

Gets or sets a value indicating whether the checkbox should be toggled when an item is clicked on the checkbox area.

CheckedCount

Gets number of checked items.

CheckedIndices

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

CheckedIndicesDescending

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

Count

Gets the number of elements contained in the control.

CurrentItemBorder

Gets or sets current item border. If it is null (default value), DefaultCurrentItemBorder is used.

CurrentItemBorderVisible

Gets or sets whether current item border is visible.

DisabledItemTextColor

Gets or sets disabled item text color.

HScrollBarVisible

Gets or sets whether horizontal scrollbar is visible in the control.

ItemAlignment

Gets or sets default alignment of the items.

ItemMargin

Gets or sets item margin.

ItemPainter

Gets or sets item painter associated with the control.

ItemTextColor

Gets or sets item text color.

MinItemHeight

Gets minimal height of the items. Default is 24 dip.

SelectedIndex

Gets or sets the zero-based index of the currently selected item in a ListBox.

SelectedItemBackColor

Gets or sets selected item text color.

SelectedItemIsBold

Gets or sets whether SelectedItem has bold font.

SelectedItemTextColor

Gets or sets selected item text color.

SelectionBorder

Gets or sets selection border.

SelectionVisible

Gets or sets whether selection background is visible.

SvgImageSize

Gets or sets default size of the svg images.

TextVisible

Gets or sets whether item text is displayed.

UserPaint

Gets or set a value indicating whether the control paints itself rather than the operating system doing so.

Methods

CheckItems(params int[])

Checks items with specified indexes.

ClearChecked(bool)

Unchecks all items in the control.

CreateHandler()

Creates a handler for the control.

DefaultDrawItem(ListBoxItemPaintEventArgs)

Default method which draws items. Called from DrawItem(ListBoxItemPaintEventArgs).

DefaultDrawItemBackground(ListBoxItemPaintEventArgs)

Draws default background for the item with the specified index. Used inside DrawItemBackground(ListBoxItemPaintEventArgs).

DefaultMeasureItemSize(int)

Default method which measures item size. Called from MeasureItemSize(int).

DrawItem(ListBoxItemPaintEventArgs)

Draws item with the specified index. If ItemPainter is assigned, uses Paint(VirtualListBox, ListBoxItemPaintEventArgs), otherwise calls DefaultDrawItem(ListBoxItemPaintEventArgs).

DrawItemBackground(ListBoxItemPaintEventArgs)

Draws background for the item with the specified index. If ItemPainter is assigned, uses PaintBackground(VirtualListBox, ListBoxItemPaintEventArgs), otherwise calls DefaultDrawItemBackground(ListBoxItemPaintEventArgs).

GetDisabledItemTextColor(int)

Gets disabled item text color.

GetItemAlignment(int)

Gets item alignment.

GetItemAllowThreeState(ListControlItem)

Gets whether three state checkbox is allowed in the item.

GetItemCheckBoxAllowAllStatesForUser(ListControlItem)

Gets whether user can set the checkbox of the item to the third state by clicking.

GetItemCheckState(ListControlItem)

Gets CheckState of the item using GetItemAllowThreeState(ListControlItem) and CheckState.

GetItemFont(int)

Gets item font. It must not be null.

GetItemImageRect(RectD, SizeD?)

Gets suggested rectangles of the item's image and text.

GetItemImages(int, Color?)

Gets item image.

GetItemMinHeight(int)

Gets item minimal height.

GetItemRect(int?)

Returns the rectangle occupied by this item in physical coordinates (dips). If the item is not currently visible, returns an empty rectangle.

GetItemShowCheckBox(ListControlItem)

Gets whether checkbox is shown in the item.

GetItemTextColor(int)

Gets item text color. Default is ItemTextColor (if it is not null) or DefaultItemTextColor.

GetSelectedItemBackColor(int)

Gets selected item back color. Default is SelectedItemBackColor (if it is not null) or DefaultSelectedItemBackColor.

GetSelectedItemTextColor(int)

Gets selected item text color. Default is SelectedItemTextColor (if it is not null) or DefaultSelectedItemTextColor.

GetVisibleBegin()

Gets index of the first visible item.

GetVisibleEnd()

Gets index of the last visible item.

HitTestCheckBox(PointD)

Returns the zero-based index of the item, if specified coordinates are over checkbox; otherwise returns null.

IsCurrent(int)

Gets whether item with the specified index is current.

IsSelected(int)

Gets whether item with the specified index is selected.

IsVisible(int)

Gets whether item with the specified index is visible.

MeasureItemSize(int)

Measures item size. If ItemPainter is assigned, uses GetSize(VirtualListBox, int), otherwise calls DefaultMeasureItemSize(int).

OnCheckedChanged(EventArgs)

Called when when the checkbox state of the item has changed.

OnHandleCreated(EventArgs)

Called when the conrol's handle is created.

OnMouseDoubleClick(MouseEventArgs)

Called when the mouse button was double-clicked.

OnMouseLeftButtonDown(MouseEventArgs)

Called when the left mouse button was pressed.

OnMouseMove(MouseEventArgs)

Called when the mouse is moved.

OnPaint(PaintEventArgs)

Called when the control is redrawn. See Paint for details.

OnScroll(ScrollEventArgs)

Called when Scroll event is raised.

RaiseCheckedChanged(EventArgs)

Raises the CheckedChanged event and calls OnCheckedChanged(EventArgs).

RefreshRow(int)

Triggers a refresh for just the given row's area of the control if it is visible.

RefreshRows(int, int)

Triggers a refresh for the area between the specified range of rows given (inclusively).

RemoveCheckedItems()

Removes checked items from the control.

ScrollRowPages(int)

Scroll by the specified number of pages which may be positive (to scroll down) or negative (to scroll up).

ScrollRows(int)

Scroll by the specified number of rows which may be positive (to scroll down) or negative (to scroll up).

SelectAll()

Selects all items in the control.

SetAllSelected(bool)

Changes selected state for all items in the control.

SetItemCheckState(int, CheckState)

Changes the check state for the specified item.

SetItemCheckStateCore(int, CheckState)

Changes the check state for the specified item.

SetItemChecked(int, bool)

Checks or clears the check state for the specified item.

SetItemCheckedCore(int, bool)

Checks or clears the check state for the specified item.

ToggleItemCheckState(int)

Changes item CheckState to the next value.

UnselectAll()

Unselects all items in the control.

Events

CheckedChanged

Occurs when the checked state of an item changes.