Quick Tip: Changing Spark DragScroll Parameters

Say you have a Spark List in your application with a TileLayout and drag options toggled on:


	
		
	

But when you drag item up the list, depending upon your itemRenderer, it may take forever for the list to scroll… and the areas which trigger scroll up and down the list view are tiny in comparison.

You need to increase both the dragScrollRegionSizeVertical and dragScrollSpeed of spark.layouts.supportClasses.LayoutBase exposed through the Layout when given an id of “GalleryLayout”, in this case:

private function adjustDragScroll():void {
	GalleryLayout.dragScrollRegionSizeVertical = 80;
	GalleryLayout.dragScrollSpeed = 100;
}

Those properties are kinda hidden, but now it’ll drag-scroll nice and quick! Modify to suit your own application, of course.

Leave a Comment

Your email address will not be published. Required fields are marked *