ComboBox.MaxDropDownItems Property

Gets or sets the maximum number of items to be shown in the drop-down portion of the ComboBox.

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

property int MaxDropDownItems {
	int get ();
	void set (int value);
/** @property */
public int get_MaxDropDownItems ()

/** @property */
public void set_MaxDropDownItems (int value)

public function get MaxDropDownItems () : int

public function set MaxDropDownItems (value : int)

Not applicable.

Property Value

The maximum number of items of in the drop-down portion. The minimum for this property is 1 and the maximum is 100.

Exception typeCondition


The maximum number is set less than one or greater than 100.

The following code example demonstrates how to initialize a ComboBox control by setting the MaxDropDownItems and DropDownStyle properties and using the FindStringExact methods to search the ComboBox. It also shows handling the SelectedIndexChanged event.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions