Automatic Control Sizing in Windows Forms MultiSelectionComboBox

27 Apr 20211 minute to read

Vertical

The control size is increased with respect to its height upon adding Visual Item, from its dropdown list.

Overview_img340

The following code sample illustrates you on how to set AutoSizeMode as Vertical.

this.MultiSelectionComboBox1.AutoSizeMode = AutoSizeModes.Vertical;
Me.MultiSelectionComboBox1.AutoSizeMode = AutoSizeModes.Vertical

Horizontal

The control size is increased with respect to its width upon adding Visual Item, from its dropdown list.

Overview_img341

The following code sample illustrates you on how to set AutoSizeMode as Horizontal.

this.MultiSelectionComboBox1.AutoSizeMode = AutoSizeModes.Horizontal;
Me.MultiSelectionComboBox1.AutoSizeMode = AutoSizeModes.Horizontal

None

The control size is only increased up to pre-defined size and once VisualItem size exceeds it, Scrollbar is displayed to navigate between its items.

Overview_img342

The following code sample illustrates you on how to set AutoSizeMode as None.

this.MultiSelectionComboBox1.AutoSizeMode = AutoSizeMode.None;
Me.MultiSelectionComboBox1.AutoSizeMode = AutoSizeMode.None