Moving widget with "fit to text width" size

First time poster:

I want a differently formatted text to follow a Label in my repeater. I want to push the second “tag” over based on the length of the first column.
Difficult to explain in words.
I’ve used the formula [[LVAR1.right + 8]] (where LVAR1 is the first Label widget) to move the “tag”. And, I’ve gotten it to work in the axure preview!

But when I publish it to Axshare, it’s all messed up :frowning:

What’s going on!

Could try doing it with a single Set Text (set to Rich Text) on a single label.

Set text: [[Item.label]] [[Item.status]]

1 Like

Hi!

Unfortunately fit-to-text is a misnomer when the text is set dynamically. The object that contains the text does not resize when the text is set dynamically; it resizes only when typing into the object while editing the prototype in Axure.

What you could do is use a single object to receive both of your repeater columns, and use the Rich Text option (since it looks like you want the second field to be lighter and italicized) to concatenate them:


I did this in your file, and inserted non-breaking spaces between the two items:

moving repeater text example.rp (49.6 KB)

[Edit] Looks like Nathan beat me to it!

2 Likes

Thank you both so much!
Learn something new every day!! I’ve never used the rich text feature, that is much easier!
Isn’t it weird that my solution worked in the Axure preview though?

I have the same question, but what if instead of text label I’m using a picture label?
That’s how it looks in preview:

And that’s what I get in browser:

1 Like

I believe this is currently expected behavior, since widgets that are set as autofit-width or autofit-height are not designed to autofit dynamically in the browser. In the case of the repeater, this means that all of the text widgets in the repeater will have the same width/height in the browser as they do on the canvas when you are editing the repeater. There is a quirk with repeaters that causes them to look like they’re autofitting text on the canvas in the tool, and this “autofit” appearance seems to stick in the browser only if nothing causes the repeater to be re-rendered. That is, nothing in the repeater can be updated, added, filtered, moved, etc…without causing the widgets to revert to the size that they are in the RP file.

I’ll go ahead and file this on our end as a request for autofit text in the browser for widgets in general. Thanks!

4 Likes

I know this is an old thread, but I tried to do what you’ve outlined here, and while it looks perfect in my workspace, the items overlap in preview. I cannot figure out what I’m doing wrong, or is this maybe just a glitch in Axure?

1 Like