Auto Size Label Flex View

I am trying to a create a popup view that auto-sizes its width based on the contents of a label component. I have a Flex view in row mode, with an embedded view (red box) and a label. The embedded view is set to grow=0, shrink=0, and fixed basis (36px). The label component is set to grow=1, shrink=1, and auto basis. However, the view does not size to the length of text.

image
image

When the label text is too long, this is what I get:
image

My intent is to have this view as instances in a flex repeater. For now, just trying to get a single instance to auto-size.

Could someone please explain how to achieve this behavior?

Thank you
Dan

Try either setting the label shrink=0, or in your AlarmActiveIndicator instance / flex repeater elementPosition to shrink=0

I tried your suggestion but still something does not seem right.
This is the view with the label and alarm indicator when viewed in designer:
image

This is an instance of that view embedded on another view, with a long text string passed to the label via parameter on the embedded view, viewed in designer:
image

I get scroll bars and the alarm indicator is no longer visible even when scrolling, and it appears this same way in the browser session.

Am I misunderstanding that the label width and the embedded view width should auto resize to fit the text?

Thanks
Dan

Don't bother too much with the repeated view itself: flex repeaters have options to ignore the view's real width and height.
Try setting your repeater up, and see if it looks like what you want.
If it doesn't, then you can take a step back and try to fix it.

The flex repeater sort of works, but not exactly how I was expecting. If I set useDefaultViewWidth = false, the label component of the view defined as the "path" for the repeater does resize to fit the length of text. But the flex repeater itself does not resize and I still get scroll bars if its width is too narrow..

Flex repeater width ok:
image

Flex repeater width too narrow:
image

The same behavior is present for the height. If the repeater is not tall enough I get scroll bars for vertical direction:
image

I also then set the flex repeater.position.width and height to "auto" and I get this:
image

Should I be expecting the flex repeater to resize both width and height to meet the contents?

Thanks
Dan

This is a very crude example, but maybe it will be helpful.

Flex Example.zip (29.4 KB)

I had some success. I am able to embed the flex repeater in a flex view in column mode, with basis=auto, and when I embed this view into another view, it auto-sizes in both directions if I set position.width and height to auto.

image

The flex repeater is embedded in a flex view because I need to display it as a popup when a button is clicked. However, when I open the view as a popup using the action performed->popup action, and leaving the width and height parameters undefined (Auto), the popup does not resize:

image
image

Dan

I made more progress on this and found that if I call the popup via a script action instead of the popup action, and set the height and width to "auto" the view resizes as expected. I now just need to figure out how to set a position relative to the mouse click using the script function.

image

It appears that when using the popup action, if the width and height fields are left blank, those properties don;t actually get set to "auto" as indicated by the grey text:
image

Is this a possible bug?

Dan