I have a UltraComboEditor with the DropDownStyle property set to DropDown.
When I traverse through the drop down list via the up / down arrows the item currently selected in the drop down appears highlighted in the text editor above the drop down. I did not see a way to turn off this highlighting.
Anything you can do in the AppStylist executable you can also do in code. You would need to do something like this:
using Infragistics.Win;using Infragistics.Win.AppStyling;using Infragistics.Win.AppStyling.Runtime;
ApplicationStyleLibrary library = new ApplicationStyleLibrary();StyleSetSettings styleSet = library.StyleSets.Add("test");styleSet.ComponentStyles.Add("UltraComboEditor");string roleName = "ValueListItem";
AppearanceBase appearance = styleSet.RoleStyles.GetStyle(roleName,true).States.GetState(RoleState.Selected,true).Appearance;appearance.BackColor = Color.Transparent;styleSet.ResolutionOrder = ResolutionOrder.ApplicationThenControl;this.lvwFiles.ComponentRole.StyleSetName = "test";library.UpdateStyleManager();
Thanks for the quick reply, but this is a one-off case (a custom ui component that wraps the UltraComboEditor) so I don't want to do this all the time via AppStyling. Is there also a way programmatically to do this?
Thanks Again!
You should be able to switch that off using AppStyling; the role name is 'ValueListItem', so you would set the BackColor of the appearance for the selected state to Color.Transparent, and the ForeColor to SystemColors.WindowText.