I was just working on a project where I needed to reposition the vertical scrollbar of a canvas from the right side to the left side. Here’s a quick hack:
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" styleName="canvasPage" x="350" y="0" width="650" height="100%" > <mx:Script> <![CDATA[ public override function validateDisplayList( ):void{ super.validateDisplayList( ); if( verticalScrollBar && verticalScrollBar.visible ){ verticalScrollBar.x = 0; } } ]]> </mx:Script> </mx:Canvas> |
Alternatively, you could set verticalScrollBar.x = -verticalScrollBar.width; to move the scrollBar outside the left edge of the canvas but keep in mind that if you set the canvas position to x=0 in the application, the verticalScrollBar will be drawn outside the viewable area.