We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

What is the use of AutoSizeMode in the MultiSelectionComboBox?

The AutoSizeMode helps you to adjust the size of the MultiSelectionComboBox according to your requirement, when its selection mode is set to VisualItem. There are three types of AutoSizeMode.

  1. None.
  2. Vertical.
  3. Horizontal.

 

None:

The AutoSizeModes.None allows you to specify the default size of the MultiSelectionComboBox.

 

Vertical:

The AutoSizeModes.Vertical allows you to adjust the size with respect to height, based on the items of the MultiSelectionComboBox.

 

Horizontal:

The AutoSizeModes.Horizontal allows you to adjust the size with respect to width, based on the items of the MultiSelectionComboBox.

 

The following code example demonstrates the same.

C#

 

VB

 

Note: The default value of the AutoSizeMode is Vertical and the DisplayMode should be specified as DisplayMode.VisualItem.

 


Figure 1: MultiSelectionComboBox specified with AutoSizeMode as None

Figure 2: MultiSelectionComboBox specified with AutoSizeMode as Vertical

Figure 3: MultiSelectionComboBox specified with AutoSizeMode as Horizontal

 

Sample Links:

C#: MultiSelectionComboBox_AutoSizeMode_C#

VB: MultiSelectionComboBox_AutoSizeMode_VB

Article ID: Published Date: Last Revised Date: Platform: Control:
5456 09/29/2015 09/29/2015 Windows Forms MultiSelectionComboBox
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.