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)?
According to our records, this was fixed in v10.1 and up so that the UltraComboEditor now correctly resolves the NullTextAppearance.
Hello,
does anything happened on this matter?I still experience this on v15.1
GreetingsEdit: I solved it another way, thanks.
I also saw this problem with the combo editor. It is taking the base role for the null text unless you reset the base role.
In addition, the UltraNumericEditor is ignoring the nulltext role completely, although its editor is EditorWithMask which should use this role.
Hello Matthew,
I discussed this behavior with our Developer Team and we decide that this behavior is unexpected. So I have logged it in our tracking system, with an issue number #57245.
Meanwhile you can use two style library to avoid this behavior. How to do this you could see on the following link:
http://help.infragistics.com/Help/NetAdvantage/WinForms/2010.2/CLR2.0/html/Win_Loading_Multiple_Style_Libraries.html
I also have created a case for you - CAS-54359-VM4D83 in order to be notified when the issue if solved.
Sincerely,
Hristo
Developer Support Engineer
Infragistics, Inc.
www.infragistics.com/support
I am not quite following your reply. Did you mean..
All controls use the Base Role, but not all controls use the Null Text rule?
I have already determined that both controls use the Null Text Role. I went the other direction and used the filter property to see which Roles are being used by each individual control. NullText is being used by both of the controls. It just isn't being applied the same way.
Please use this isl and run your example that you sent me.
What you will see is that the background image, text alignment and italics are being applied but the fore color is only being applied to one of the objects the other is using the fore color from the Base Role. I would understand if the role just wasn't being used, but if that were the case then I would expect that none of the attributes would apply. As a developer how am I supposed to know which individual pieces of Roles are going to be applied if this is indeed the desired application behavior.