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.
Syncfusion Feedback

combobox font

Thread ID:

Created:

Updated:

Platform:

Replies:

43412 Apr 21,2006 08:23 PM UTC Apr 24,2006 02:05 PM UTC Windows Forms 3
loading
Tags: GridControl
Hui Zhong
Asked On April 21, 2006 08:23 PM UTC

In OnQueryCellInfo(), some cells are set : e.style.font.underline = true In OnCurrentCellShowingDropDown(), the combobox cell list is populated at the runtime, however, all the item list was underlined. Is possible to remove those underline for the list items in the combo box? Thanks Hui

Administrator [Syncfusion]
Replied On April 24, 2006 07:11 AM UTC

Hi Hui, Yes, it is possible to avoid underline for the list items by setting the font style to the cr.ListBoxPart.Font in the CurrentCellShowingDropDown. Below is a code snippet. GridCurrentCell cc = grid.CurrentCell; GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer; cr.ListBoxPart.Font = new System.Drawing.Font(cr.ListBoxPart.Font, System.Drawing.FontStyle.Regular); cr.ListBoxPart.DataSource = this.sourceList; Regards, Calvin.

Hui Zhong
Replied On April 24, 2006 01:59 PM UTC

Thanks very much Calvin. It worked. However, after the item is selected from the combobox list, and the dropdown is disappear, I hope the font of the selected item is shown as underlined. how to do that? Hui >Hi Hui, > >Yes, it is possible to avoid underline for the list items by setting the font style to the cr.ListBoxPart.Font in the CurrentCellShowingDropDown. Below is a code snippet. > >GridCurrentCell cc = grid.CurrentCell; >GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer; > >cr.ListBoxPart.Font = new System.Drawing.Font(cr.ListBoxPart.Font, System.Drawing.FontStyle.Regular); >cr.ListBoxPart.DataSource = this.sourceList; > > >Regards, >Calvin.

Hui Zhong
Replied On April 24, 2006 02:05 PM UTC

I already figured it out. Thanks Hui >Thanks very much Calvin. It worked. >However, after the item is selected from the combobox list, and the dropdown is disappear, I hope the font of the selected item is shown as underlined. how to do that? > >Hui > >>Hi Hui, >> >>Yes, it is possible to avoid underline for the list items by setting the font style to the cr.ListBoxPart.Font in the CurrentCellShowingDropDown. Below is a code snippet. >> >>GridCurrentCell cc = grid.CurrentCell; >>GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer; >> >>cr.ListBoxPart.Font = new System.Drawing.Font(cr.ListBoxPart.Font, System.Drawing.FontStyle.Regular); >>cr.ListBoxPart.DataSource = this.sourceList; >> >> >>Regards, >>Calvin.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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

;