Skip to content

ListBox

ProGraMajster edited this page Mar 28, 2026 · 1 revision

ListBox

← Back to Control Inventory

Summary

Represents a ListBox control.

Example

var listBox = new ListBox();
listBox.Items.Add("First");
listBox.Items.Add("Second");

Documented Properties

Name Summary
DefaultCursor No XML summary yet.
DefaultSize No XML summary yet.
FirstVisibleIndex Gets or sets the index of the first visible item.
ItemHeight Gets or sets the unscaled height each item will use.
Items Gets the collection of items contained by this ListBox.
ScaledItemHeight Gets the scaled height each item occupies.
ScrollbarAlwaysVisible Gets or sets a value indicating if the vertical scrollbar is always shown.
SelectedIndex Gets or sets the index of the currently selected item. If there are multiple selected items, the first item's index will be returned.
SelectedItem Gets or sets the currently selected item, if any. If there are multiple selected items, the first selected item will be returned.
SelectedItems Gets all currently selected items.
SelectionMode Gets or set the selection mode of the ListBox.
ShowHover Gets or sets whether the item currently containing the mouse pointer should be highlighted.
Style No XML summary yet.
VisibleItemCount The number of full items that can be shown at a time.

Documented Methods

Name Summary
#ctor Initializes a new instance of the ListBox class.
FindString Finds the index of the next item after startIndex that begins with the specified string. This search is case-insensitive.
GetIndexAtLocation Gets the index of the item currently at the specified location.
GetItemRectangle Gets the bounding rectangle for the specified item.
OnKeyUp No XML summary yet.
OnMouseDown No XML summary yet.
OnMouseLeave No XML summary yet.
OnMouseMove No XML summary yet.
OnMouseUp No XML summary yet.
OnMouseWheel No XML summary yet.
OnPaint No XML summary yet.
OnSelectedIndexChanged Raises the SelectedIndexChanged event.
SetBoundsCore No XML summary yet.

Documented Events

Name Summary
SelectedIndexChanged Raised when the value of the SelectedIndex property changes.

Notes

  • This page was generated from the public XML documentation of ModernFormsNext.
  • Base members inherited from Control, ScrollableControl, WindowBase, or other parent types may not all be repeated here.

Clone this wiki locally