)
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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to apply font settings in the WinForms MultiColumnComboBox DropDown?

Platform: WinForms |
Control: MultiColumnComboBox |
Published Date: September 4, 2015 |
Last Revised Date: January 6, 2020

Apply font settings

In the MultiColumnComboBox, GridListControl is used as the DropDown control, and its row size is not be applied based on the font settings. GridListControl row and column sizes can be updated based on its font size, by using the ResizeToFit function.

 

The following code example demonstrates the same.

C#

//Resizes the column width on specifying the font.
this.mGrid_02.ColWidths.ResizeToFit(GridRangeInfo.Table());
//Resizes the row height on specifying the font.
this.mGrid_02.RowHeights.ResizeToFit(GridRangeInfo.Table());

VB

'Resizes the column width on specifying the font.
Me.mGrid_02.ColWidths.ResizeToFit(GridRangeInfo.Table())
'Resizes the row height on specifying the font.
Me.mGrid_02.RowHeights.ResizeToFit(GridRangeInfo.Table())

 

Note:

The Grid is displayed without hiding or wrapping text by using the ResizeToFit function in the GridControl.

 

Before selecting font in MultiColumnComboBox

Figure 1: Before selecting font in MultiColumnComboBox

After selecting font in MultiColumnComboBox without resizing rows and columns

Figure 2: After selecting font in MultiColumnComboBox without resizing rows and columns

Font specified in MultiColumnComboBox with resizing rows and columns

Figure 3: Font specified in MultiColumnComboBox with resizing rows and columns

Samples:

C#: MultiColumnComboBox_ResizeToFit_C#

VB: MultiColumnComboBox_ResizeToFit_VB

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon