Auto Sizing a Box Widget to fit Text

Another newbie query…

Seeing the design limitations of Classic Menus, I’m attempting to build out some menus using box widgets. I’ve searched the forums and haven’t found a solution to my problem (might be there, just haven’t found it).

I’d like to set the styling of a box with the menu title. As titles differ in length, is there a way to have the box auto-adjust its width? That is, the styling has zero padding R&L. I want the menu title for the “SHORT” menu title to fit, as well as the"REALLY LONG STUFF" to fit, without having to manually adjust each menu item.

@Figment, Yes, you can do this.

There is an explanation of text settings for widgets on this reference page:
https://www.axure.com/support/reference/shape-widgets#location,_size,_and_rotation

  • Shape widgets can also be sized to the text they contain. Double-click a handle on a widget’s left or right side to automatically size the widget’s width. Double-click a handle at the top or bottom of a widget to set the height of the widget to its contents. Double-clicking a corner will automatically set both the width and the height.

You can also look in the Style Tab of the Inspector panel on the right. There are two little buttons for Fit Text Width and Fit Text Height:

Do note that if you change the text dynamically, the widget will not resize to fit the new text–it only works at page load. A while back I worked out several methods to try to work around this limitation in this thread:

…and another example applied to a basic text widget without all the repeater stuff:

1 Like

mbc66 –

Brilliant! Thank you.

Figment

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.