Hi!
I am using the UltraToolbar. There I have Standard Toolbar Buttons and I have ControlContainers with Standard UltraButtons on them.
When using different styles I get different font Settings on my Ultrabuttons in the ControlContainers. Basically I am Setting Fontsize, bold and fontfamily in my Toolbarsettings. But the Appstylist changes this Settings and does not apply These Settings on my Ultrabuttons.
I tried to modify the Resolution Order in the isl (e.g. Office 2007blue), but did not get the expected result.
How can I copy the Buttonstyle of the Toolbarbutton to my UltraButtons?
TIAJosef Resperger
Hi Josef,
If they are UltraButton controls, then all you have to do is Style the UltraButton UIRole and apply the same font to it as you are applying to the toolbars.
Thanks for the quick reply, but I think it is not that easy.I am doing this all dynamic - the whole toolbar, and Buttons are used on the forms too. If I go to style the button in General, this would affect not only the Buttons inside the toolbar?
And how can I do this dynamically?
Hi,
So you want to style the buttons on the toolbar differently than the other buttons on the form?
Okay... the only way to do that will require changes to the application code. AppStylist can't treat controls differently without a little help.
What you do is add a new StyleSet to your Style Library. The new StyleSet would apply only to the buttons on the toolbar. Then you set the StyleSetName property on the buttons on the toolbar to the name of this new StyleSet.
Up to now I have not seen that the Styling of the Toolbar Buttons has anything in common with the Style of the normal Buttons.
I use the same style for everything on the form, but the toolbarbuttons look different from the normal Buttons ...
e.g. I have the trendy Style and my Buttons look green, the toolbar Buttons are sort of White. And I did not alter the style.
It Looks like this has to do with the extra ButtonStyleProperty?
I'm afraid you lost me. The styling of the UltraButton does not normally have anything to do with the style of toolbar buttons. They are completely separate objects and they don't look alike in most applications.
If you are saying that you are applying styling to UltraButton controls and then UltraButton controls on the form look different than the ones on the toolbar, then I'm not sure why that would be, unless you are doing something to explicitly make that happen such as using StyleSetName or StyleLibraryName.
From your initial post, I thought you wanted the UltraButtons on the toolbar to look more like toolbar buttons and not like the other buttons on the form. Is that not what you wanted? I doubt you ever be able to get them to look exactly like toolbar buttons. They are not the same objects. But I would think it should be possible to get them pretty close.
BTW... why use an UltraButton on a toolbar, instead of a toolbar button, anyway?
I am glad to hear this. Thank you for sharing your solution with us.
We believe that the other community members could benefit from such threads.
Please feel free to let me know if a question about our toolset comes up on your mind.
I solved the Problem with another metod. I work with normal Toolbarbuttons again and catch the right mouse click and open a free Standing ToolStipmenu. That way I Need not concern with the style.
Thanks for your efforts
HI!
No, Actually I have no experience with that and I did not have time to study this in Detail in the meantime.Styling is a complicated matter to discover.Thanks for your concern anyway.Josef
Hi Resperger,
Did you have the time to try the 'StyleSet' approach. Do you think that it suits your needs?
Okay, I was just curious why you were using UltraButtons. I assumed there was a good reason, but I thought that if I understood what it was, maybe I could provide you with some alternative.
I'm afraid I'm still not entirely clear on what the issue is, though. The UltraButton control will display whatever font you tell it to use based on it's UIRole in AppStylist. So if you need to set the UltraButtons on the toolbar to use a different font than UltraButtons elsewhere in the application, then using StyleSets is a good option. There are other ways you could do it, like using a DrawFilter. But the StyleSet option is easier and requires less code, I think.