Hi.
How could i adjust the width of buttontools on the toolbar according to text width?
I also create buttontools dynamically. Usually they have an image but if a button doesn't, I set its SharedProps:DisplayStyle to TextOnlyAlways instead of the default ImageAndText.
What are you setting as their DisplayStyle on either their InstanceProps or SharedProps? By default on toolbars, only the image is displayed for ButtonTools. So by default, they should all have the same width. If this is the case, set the DisplayStyle to ImageAndText. If this is not the case, can you post a screen shot of what you application looks like at runtime? This will help me determine what the problem is.
Anyone?
The problem still exists, when tools are added dynamically, they have default width (and width property is read-only in runtime)
Mike Dour"]Are you changing the Font size of individual tools? I don't believe the tools take into account their Font when measuring. I think this is ignored so all tools in the toolbar have the same height. If you do want to change the Font, change it on the toolbar's settings
Well, that is not the case. I do not change font settings at all.
I build the toolbar dynamically, and all tools added all have the default width regardless of actual text.
Are you changing the Font size of individual tools? I don't believe the tools take into account their Font when measuring. I think this is ignored so all tools in the toolbar have the same height. If you do want to change the Font, change it on the toolbar's settings.