package
{
import mx.controls.List;
import mx.controls.listClasses.IListItemRenderer;
public class TransparentList extends List
{
override protected function createChildren():void
{
super.createChildren();
setStyle( "backgroundAlpha", "0" );
setStyle( "borderStyle", "none" );
}
override protected function drawItem( item:IListItemRenderer,
selected:Boolean=false,
highlighted:Boolean=false,
caret:Boolean=false,
transition:Boolean=false):void
{
super.drawItem(item, false, false, caret, transition);
}
}
}
In createChildren() set the border and background alpha styles. Then override the protected drawItem() function and always pass false to the selected and highlighted parameters of the parent function. You can do the same thing for the Tree component.
0 comments:
Post a Comment