Reputation: 1875
I have a GridItemRenderer in which I want to place 3 labels so that the first label will be attached to the left and the other two labels will be attached to the right. Furthermore, the last label should be sized between 50-150px (100% if possible) in width and I would like all renderers to look the same. Another requirement is that the labels will not overlap. If there is not enough room, the last label should be truncated to fit.
Here is an example of the renderer:
Here is what I have:
<s:HGroup width="100%" height="17" verticalAlign="middle">
<s:Label id="name" showTruncationTip="true" maxDisplayedLines="1" />
<s:Spacer width="100%" />
<s:Label id="id" showTruncationTip="true" maxDisplayedLines="1" />
<s:Label id="comment" width="100%" minWidth="50" maxWidth="150" color="0x000000" showTruncationTip="true" maxDisplayedLines="1" />
</s:HGroup>
The problem is that the comment
label resizes based on the name
width even if there is enough width, while I want it fixed (so that all of the renderers will look the same).
Is there any way I can limit the comment
label with min and max width values while suggesting that it should be as wide as can be?
Upvotes: 0
Views: 51
Reputation: 1875
The sad part of being a flex coder is that I sometimes feel alone in this world. It seems that no-one cares these days about flex ...
Nevertheless, for the sake of stray dogs like me getting in here, I'll continue with the habit of answering my own questions.
It seems that the spacer was the culprit. For some reason, it seems that its width was more important than others. Anyway, by removing the spacer and assigning a width of 100% to the name label and reducing the comment label to 50% (just so that name will be more prominent), I managed to do what I wanted.
Upvotes: 1