On 2/1/08, learner <[EMAIL PROTECTED]> wrote: > thanks Manish, > But in which function shall i do that?? > In measure(), in updateDisplayList () or commitProperty()..... > and ..... also the height of the textArea should affect the row height in > list... > so i also need to do....something like this > > this.height = messageTxt.heigt+messageTxt.y
If you want your item renderer to affect the height of the row, all you have to do is set the correct measuredHeight in your measure() implementation. Note that you have to set your measuredHeight, not your height! Flex components don't set their own width/height: that's a rule. You set your measuredWidth and measuredHeight and let the parent decide how it wants to size you. Now, to compute your measuredHeight, you need to use the measuredHeight of the TextArea object. TextArea objects don't measure their size based on their contents -- it's always a certain default size. So you'll have to extend TextArea to create a CustomTextArea, override measure(), and do something like what Text does (see Text.as from the framework source). If you look in the archives, there should be examples of this already. Manish