When does the horizontalScrollBar get created on a List?
The scroller is created, but the scrollbar isn't created yet and I get an error:
I have a spark List:
<s:List id="list" creationComplete="creationCompleteHandler(event)">
<s:layout>
<s:HorizontalLayout />
</s:layout>
</s:List>
private function creationCompleteHandler(event:FlexEvent):void {
(event.currentTarget as List).scroller.addEventListener( FlexEvent.UPDATE_COMPLETE, onScrollerComplete );
// these don't trigger anything!
// (event.currentTarget as List).scroller.addEventListener(FlexEvent.CREATION_COMPLETE , onScrollerComplete );
// (event.currentTarget as List).scroller.addEventListener(Event.ADDED_TO_STAGE , onScrollerComplete );
}
private function onScrollerComplete(event:Event):void {
// horizontalScrollBar still null at this point - how can I use it?
// I want to set the style, but it's not created yet!
// event.currentTarget.scroller.horizontalScrollBar.setStyle("repeatInte rval", 600);
}
North America
Europe, Middle East and Africa
Asia Pacific