How many renderers do you have?  If not too many, you could hide a label
that should size correctly (if minWidth=0) then bind to that width.

-Alex

On 3/11/14 1:48 AM, "Scott Matheson" <[email protected]> wrote:

>The designer has the text box changeling wide for each sentence in a
>lesson (to keep students eye focus)
>
>Width as 100% does not work as the text box is Always the same size
>
>Datagroup with a horizontal layout works well but we can not use this for
> text area
>
>I have tried minWidth expecting the box to autoscale the width to fit the
>text with no luck
>
>
>
>
>
>
>Sent from my iPhone
>
>> On 10 Mar 2014, at 22:40, "Alex Harui" <[email protected]> wrote:
>>
>> Well, length is just the number of characters, so that will be way too
>> small.
>>
>> If you only want one line of text, why not use TextInput?  Maybe
>>TextInput
>> will work if you set width="100%"
>>
>>
>>> On 3/10/14 11:14 AM, "Scott Matheson" <[email protected]> wrote:
>>>
>>> Hi
>>>  Trying to find a method to make a textArea dynamic in width in an
>>> itemRenderer
>>>
>>>
>>>
>>> <?xml version="1.0" encoding="utf-8"?>
>>>
>>> <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009";
>>>
>>> xmlns:s="library://ns.adobe.com/flex/spark"
>>>
>>> xmlns:mx="library://ns.adobe.com/flex/mx"
>>>
>>> autoDrawBackground="false"
>>>
>>> width="100%" height="100%">
>>>
>>>
>>>
>>> <s:TextArea id="sentenceArea" width="{sentenceArea.text.length}"
>>> height="100%" editable="false" fontSize="22">
>>>
>>> <s:p>
>>>
>>> <s:linkHoverFormat>
>>>
>>> <s:TextLayoutFormat color="#0066FF" />
>>>
>>> </s:linkHoverFormat>
>>>
>>> <s:linkNormalFormat>
>>>
>>> <s:TextLayoutFormat color="#000000"/>
>>>
>>> </s:linkNormalFormat>
>>>
>>> <s:a click="playClip(event)" >
>>>
>>> {data.text.toString()}
>>>
>>> </s:a>
>>>
>>> </s:p>
>>>
>>> </s:TextArea>
>>>
>>> </s:ItemRenderer>
>>>
>>>
>>> ________________________________
>>>
>>> Disclaimer: This electronic mail and any attachments are confidential
>>>and
>>> may be privileged. If you are not the intended recipient, please notify
>>> the sender immediately by replying to this email, and destroy all
>>>copies
>>> of this email and any attachments. Thank you.
>>
>
>________________________________
>
>Disclaimer: This electronic mail and any attachments are confidential and
>may be privileged. If you are not the intended recipient, please notify
>the sender immediately by replying to this email, and destroy all copies
>of this email and any attachments. Thank you.

Reply via email to