2 people found this helpful
Spark DataGrid has a Scroller inside of its DataGridSkin that controls the appearance and behavior of the scrolling functionality. By default, Scroller uses the ScrollerSkin skin class. Start by looking at spark.skins.spark.ScrollerSkin. If you want the Scroller inside of your DataGrid to have a different appearance, assign it a different skinClass.
skinClass : ClassReference("myScrollerSkinClass")
Thanks. I'm not sure exactly how I did it, but I started with this document in Flash Builder Help:
"Setting a custom horizontal scroll bar skin on a Spark List control in Flex 4"
I copied the code and changed "s|List" to "s|Datagrid", modified it accordingly for a vertical scroll bar, and I deleted references to "base color" so that it would compile. Then, I copied in VScrollBarTrackSkin.mxml and VScrollBarThumbSkin.mxml from the Flash Builder directory: Adobe Flash Builder 4.5\sdks\4.5.1\samples\themes\zen\src\zen\skins. And I removed the references to the swf files so that it would compile. Then I embedded my own png images, e.g.: source.up="@Embed(source='/images/thumb.png')". And I got a scrollbar!
Only problem is the example does not have up and down controls. But I figured this out from looking at the zen skins (VScrollBarSkin / HScrollBarSkin) and copying in the code for the up and down buttons as well. Now it's working pretty good.
[I did not use any of the Flash Builder wizards/GUI to create the skins or files. I just created the files individually (as in File - New - File). Perhaps there's a better way to do it, but this worked for me.]
I'm not sure why you suggested looking at "ScrollerSkin". This didn't lead me anywhere, though perhaps I was not clear in my question. But I greatly appreciate your answer, for saying that this is possible, otherwise I would have given up!