I am trying to set the background color of some ultracombos on a windows form to a different color in order to indicate which ones are required. I thought it should be as easy as setting the ultracombo.Appearance.BackColor property, however, this doesn't seem to be the case. When I set that property in design mode the backcolor changes color. However, after running the application and then bringing up the form the background color is back to its default. And no matter what I try in the code it never seems to change. I have tried setting numerous properties, the one previously mentioned as well as those in the displaylayout, band, and override. Still no luck. I also tried setting them at different times; constructor, form load, and specific control's initialize layout event. Again, nothing. Please help. What am I doing wrong. How do I programmatically set the BackColor property.
PS. I have UseAppStyling set to true and UseOsThemes is set to its default. Although I have tried disabling both with no change.
Thank you in advance for any help.
Hm. Perhaps you set the ResolutionOrder on the Combo's ComponentRole to ApplicationOnly - thus eliminating the control from the appearance resolution process?
There is nowhere that I was resetting the color. However, I did manage to get it working properly by leaving the app style on and creating a new style and altering the properties of the controls I use and then setting the stylesetname property in the code.
I can see no reason why the controls would fail to honor the BackColor - especially if you are setting it at run-time.
The only way this could happen in my experience is if your code is setting the BackColor back to the default after you set it. Have you tried searching the code to see if something else is setting the BackColor back or resetting it after you set it?