How to set scrollbar at left side for List component in Flex ?

1) protected override function updateDisplayList( unscaledWidth:Number, unscaledHeight:Number ):void
{
	super.updateDisplayList( unscaledWidth, unscaledHeight );

	if( verticalScrollBar && verticalScrollBar.visible )
	{
		verticalScrollBar.x = -verticalScrollBar.width;
	}
}

2) [HostComponent("spark.components.List")]
<!--- The Scroller component to add scroll bars to the list. -->
	<!-- left/right values are adjusted here to prevent the rolloverColor/selectionColor from overlapping onto the border.  -->
	<s:Scroller left="4" top="10" right="4" bottom="10" id="scroller"
				minViewportInset="1" hasFocusableChildren="false" layoutDirection="rtl">
		<!--- @copy spark.components.SkinnableDataContainer#dataGroup -->
		<s:DataGroup id="dataGroup" itemRenderer="spark.skins.spark.DefaultItemRenderer" layoutDirection="ltr" >
			<s:layout>
				<!--- The default layout is vertical and measures at least for 5 rows.
				When switching to a different layout, HorizontalLayout for example,
				make sure to adjust the minWidth, minHeihgt sizes of the skin -->
				<s:VerticalLayout gap="0" horizontalAlign="contentJustify" requestedMinRowCount="5" />
			</s:layout>
		</s:DataGroup>
	</s:Scroller>
output:
List

		
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s