效果如图:
样式:
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
.VScrollBarStyle {
downArrowUpSkin: Embed(source="assets/images/cloud/step_thumb.png");
downArrowOverSkin: Embed(source="assets/images/cloud/step_thumb.png");
downArrowDownSkin: Embed(source="assets/images/cloud/step_thumb.png");
upArrowUpSkin: Embed(source="assets/images/cloud/step_thumb.png");
upArrowOverSkin: Embed(source="assets/images/cloud/step_thumb.png");
upArrowDownSkin: Embed(source="assets/images/cloud/step_thumb.png");
thumbDownSkin:
Embed(source="assets/images/cloud/step_thumb.png",
scaleGridLeft="7", scaleGridTop="5",
scaleGridRight="8", scaleGridBottom="7");
thumbUpSkin:
Embed(source="assets/images/cloud/step_thumb.png",
scaleGridLeft="7", scaleGridTop="5",
scaleGridRight="8", scaleGridBottom="7");
thumbOverSkin:
Embed(source="assets/images/cloud/step_thumb.png",
scaleGridLeft="7", scaleGridTop="5",
scaleGridRight="8", scaleGridBottom="7");
trackSkin:
Embed(source="assets/images/cloud/step_thumb.png",
scaleGridLeft="7", scaleGridTop="4",
scaleGridRight="8", scaleGridBottom="6" );
}
</fx:Style>
使用方法:
在tree组件中加上这个属性 verticalScrollBarStyleName="VScrollBarStyle"