MultiColumn Property

ListBox::MultiColumn Property

 

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

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
property bool MultiColumn {
	bool get();
	void set(bool value);
}

Property Value

Type: System::Boolean

true if the ListBox supports multiple columns; otherwise, false. The default is false.

Exception Condition
ArgumentException

A multicolumn ListBox cannot have a variable-sized height.

A multicolumn ListBox places items into as many columns as are needed to make vertical scrolling unnecessary. The user can use the keyboard to navigate to columns that are not currently visible. Set the HorizontalScrollbar property to true to display a horizontal scroll bar that enables the user to scroll to columns that are not currently shown in the visible region of the ListBox. The value of the ColumnWidth property determines the width of each column.

The following code example demonstrates a simple two-column ListBox.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft