You don't understanf the logic of itemRenderers. Control once create itemRenderers for all visible elements. Then you scroll control only data for this itemRenderes is changed. So you need to change style for renderer in function set data(value). Note that Text control may be still null, so you should save creationComplete event handler.
As you see my code , I'm using the creationcomplete on itemrenderer.But the records are not perfect.some companies have underline who have no website and some have no underline but on click open the website.So what will i do?
You should add function to override set data.
override public function set data(value:Object):void
super.data = value;// after that logic from your function
ins.setStyle("textDecoration","underline");//Alert.show(""+ins.getStyle("textDecoration") ) ;
when call this function,on creationcomplete?what is advantage of override?which parameter I passed on set data()?
This function is automaticaly called than component is used as an itemRenderer.
Overrideing this function for itemRenderers is the main part for creating custom itemRenderer.
Now you can add code written adbode and check.
Message was edited by: _Natasha_
Thank a lot,I really don't know this and its really helpfull.But as you see my code,i am using the text to set style textdecoration.But i want to use the label.But i don't know how to set style textdecoration for label?
I want label because when i resize the column then only i want the tooltip,otherwise not.and label have this default property.
Please help me,thanks.
Label also has style textDecoration so code will be the same.
I am using labelId.setStyle("textDecoration","underline");But not working.
Text is a subclass of Label and style textDecoration is defined in Label and thats why there is in Text.
May be you can't see line because of the dimentions?
Try to create a label separetely from your grid and you can see that this styled is applied to Label.
what happen in itemrenderer root tag not giving the id.So in canvas or Vbox i have put the label with id.So not giving the style.