System.Windows.Forms.ListBox: Property Members

The properties of System.Windows.Forms.ListBox are listed below. For a list of all members, see the ListBox Members list.

See Also: Inherited members from System.Windows.Forms.ListControl

Public Properties

override
BackColorSystem.Drawing.Color.

Gets or sets the background color for the control.

override
BackgroundImageSystem.Drawing.Image.

This property is not relevant to this class.

override
BackgroundImageLayoutImageLayout.

Gets or sets the background image layout for a System.Windows.Forms.ListBox as defined in the System.Windows.Forms.ImageLayout enumeration.

BorderStyleBorderStyle.

Gets or sets the type of border that is drawn around the System.Windows.Forms.ListBox.

ColumnWidthint.

Gets or sets the width of columns in a multicolumn System.Windows.Forms.ListBox.

[read-only]
CustomTabOffsetsListBox.IntegerCollection.

Gets the width of the tabs between the items in the System.Windows.Forms.ListBox.

DrawModeDrawMode.

Gets or sets the drawing mode for the control.

override
FontSystem.Drawing.Font.

Gets or sets the font of the text displayed by the control.

override
ForeColorSystem.Drawing.Color.

Gets or sets the foreground color of the control.

HorizontalExtentint.

Gets or sets the width by which the horizontal scroll bar of a System.Windows.Forms.ListBox can scroll.

HorizontalScrollbarbool.

Gets or sets a value indicating whether a horizontal scroll bar is displayed in the control.

IntegralHeightbool.

Gets or sets a value indicating whether the control should resize to avoid showing partial items.

ItemHeightint.

Gets or sets the height of an item in the System.Windows.Forms.ListBox.

[read-only]
ItemsListBox.ObjectCollection.

Gets the items of the System.Windows.Forms.ListBox.

MultiColumnbool.

Gets or sets a value indicating whether the System.Windows.Forms.ListBox supports multiple columns.

PaddingPadding.

This property is not relevant to this class.

[read-only]
PreferredHeightint.

Gets the combined height of all items in the System.Windows.Forms.ListBox.

override
RightToLeftRightToLeft.

Gets or sets a value indicating whether text displayed by the control is displayed from right to left.

ScrollAlwaysVisiblebool.

Gets or sets a value indicating whether the vertical scroll bar is shown at all times.

override
SelectedIndexint.

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

[read-only]
SelectedIndicesListBox.SelectedIndexCollection.

Gets a collection that contains the zero-based indexes of all currently selected items in the System.Windows.Forms.ListBox.

SelectedItemobject.

Gets or sets the currently selected item in the System.Windows.Forms.ListBox.

[read-only]
SelectedItemsListBox.SelectedObjectCollection.

Gets a collection containing the currently selected items in the System.Windows.Forms.ListBox.

SelectionModeSelectionMode.

Gets or sets the method in which items are selected in the System.Windows.Forms.ListBox.

Sortedbool.

Gets or sets a value indicating whether the items in the System.Windows.Forms.ListBox are sorted alphabetically.

override
Textstring.

Gets or searches for the text of the currently selected item in the System.Windows.Forms.ListBox.

TopIndexint.

Gets or sets the index of the first visible item in the System.Windows.Forms.ListBox.

UseCustomTabOffsetsbool.

Gets or sets a value indicating whether the System.Windows.Forms.ListBox recognizes and expands tab characters when it draws its strings by using the ListBox.CustomTabOffsets integer array.

UseTabStopsbool.

Gets or sets a value indicating whether the System.Windows.Forms.ListBox can recognize and expand tab characters when drawing its strings.

Protected Properties

[read-only]
override
AllowSelectionbool.

Gets a value indicating whether the System.Windows.Forms.ListBox currently enables selection of list items.

[read-only]
override
CreateParamsCreateParams.

Gets the required creation parameters when the control handle is created.

[read-only]
override
DefaultSizeSystem.Drawing.Size.

Gets the default size of the control.