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 how can i achieve this... are there any samples like this.. in sample given by Alex i could not find anything which addresses this problem. On Feb 1, 2008 6:52 PM, Manish Jethani <[EMAIL PROTECTED]> wrote: > On 2/1/08, learner <[EMAIL PROTECTED] <peacocksea%40gmail.com>> > wrote: > > > I want to have my list variable row height ...precisely the height of > the row should the height of the text displayed in it.. > > > > I have my item rendere like this ..it has image to show and textArea > which will have html text to display in it... > > [snip] > > > messageTxt = new TextArea(); > > > override protected function measure():void{ > > trace("measure for message box " + msgObject.message) > > super.measure(); > > messageTxt.x = 55; > > messageTxt.width = this.width - 55 - timeStamp.width; > > // should i set the height of the messageTxt here as messageTxt.height = > messageTxt.textHeight ............but it does not work correctly.. > > } > > Try calling messageTxt.validateNow() before accessing the height. The > TextArea object needs to remeasure its height based on the width > you've set. > > Manish > >