Hi
I can't work out how to set the hot tracking properties for an ultracombo from the style sheet. I can get it working fine for the UltraComboEditor, but I can't find the corresponding property in the AppStylist for the ultracombo?
Tom,
I agree that this could be a useful feature. If you like, you can submit your idea to our product ideas site where it will be reviewed by our product management team. You can access the site here: http://ideas.infragistics.com/
The PM team will provide any feedback to you through that site, and members of the community can vote for and discuss the idea.
Hi Mike
Thanks very much for that. I didn't use the solution exactly as you have it because I already had some other code that set the text colour depending on some other factors, but the events were just what I needed to trigger all of that.
I think there should be an app stylist setting for that though, every other control has it and doing the above for every combo in a big system would be a real nuisance.
Cheers, Tom
Hi Tom,
It looks like AppStylist doesn't have a HotTracked state for UltraCombo. If you would like to have behavior like this in your application, you can do it in code. Try handling the following methods in your application.
private void ultraCombo1_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e){ if (e.Element is UltraComboUIElement) { UltraCombo combo = sender as UltraCombo; if (sender != null) { // originalColor will need to be defined outside the scope of this method originalColor = combo.Appearance.BackColor; combo.Appearance.BackColor = Color.Red; } }} private void ultraCombo1_MouseLeaveElement(object sender, Infragistics.Win.UIElementEventArgs e){ if (e.Element is UltraComboUIElement) { UltraCombo combo = sender as UltraCombo; if (sender != null) { // originalColor will need to be defined outside the scope of this method combo.Appearance.BackColor = originalColor; } }}
private void ultraCombo1_MouseEnterElement(object sender, Infragistics.Win.UIElementEventArgs e){ if (e.Element is UltraComboUIElement) { UltraCombo combo = sender as UltraCombo; if (sender != null) { // originalColor will need to be defined outside the scope of this method originalColor = combo.Appearance.BackColor; combo.Appearance.BackColor = Color.Red; } }}
private void ultraCombo1_MouseLeaveElement(object sender, Infragistics.Win.UIElementEventArgs e){ if (e.Element is UltraComboUIElement) { UltraCombo combo = sender as UltraCombo; if (sender != null) { // originalColor will need to be defined outside the scope of this method combo.Appearance.BackColor = originalColor; } }}
Sorry, should have been clearer in my original post; the thing I want to hot track is the text in the combo when it is rolled up and not in edit mode. All the rest of the editors (text boxes, ultracomboeditors etc.) can change colour when I hover the mouse over their text areas, but not the ultracombo? It's very obviously not consistent when you are moving the mouse around in the UI?
Thank you for contacting Infragistics Developer Support.
If you want to change the hot tracking properties of the combo rows you need to change the properties of the GridRow. Most of the things that you change in the grid with the AppStylist will be also applied to the combo. From the combo itself you can only change the appearance of the edit portion and the dropdown arrow.
I have attached a sample with an *.isl file in which I have modified the hot tracking properties of the dropdown arrow and the combo rows.
Let me know if you have any additional questions.