I have built two classes each inherits one of the classes above. I built in some extra properties and used overrides to change the behavior slightly. One difference that is making me scratch my head a little is the NullText appearance. I used the AppStylist to modify the Base/NullText Role. This has effectively changed the appearance for both controls, almost. I have specified that NullText be Italicized, but only the ComboEditor honors this aspect of the Role style. All of the other options are fine, text size, text color and background image. The italicized text is the only one that isn't applying in the same manner. Is this something that I just have to deal with? I think I can override the OnCreateControl() for the ComboBox but since the UltraCombo doesn't have a specific NullTextAppearance I would have to try and manage the italics by evaluating the value and then reseting. That just seems a little much. Perhaps I am missing something else?
Hello Matthew, I have created a simple application where I have used UltraCombo and UltraComboEditor and attach it to this post. I also used the AppStylist to modify the Base/NullText Role to be Italic, and it will apply on the both controls. Let me know if you have any further questions.
I ran your example and found that it does indeed work as expected. I played around with more of the settings that I was using yesterday and was able to get the italics to work. What I am seeing now is still strange and easily reproduced with your sample. Specify the fore color attribute on the Base Role and a different fore color on the Null Text Role, then re-run the application. One of the controls uses the NullText fore color and the other control uses the Base fore color. I think I may have had Italics set to false inadvertantly on the the Base role previously. If you set Base to false instead of default you will see differences in the NullText format.
I guess the question is what are the hierarchy rules for Base? I would have assumed that Base sets the "Global" font for everything. Anything that is not default should then override Base. In practice this does not seem to be the case. Is this the intended behavior (Base overriding some aspects of child controls)?