首页 > 代码库 > Flex:自定义滚动条样式/隐藏上下箭头

Flex:自定义滚动条样式/隐藏上下箭头

Flex组件自定义滚动条的实现

.scrollBar{
downArrowUpSkin:Embed(source="img/mainLeftScrollBar/bar_bottom.png");
downArrowOverSkin:Embed(source="img/mainLeftScrollBar/bar_bottom.png");
downArrowDownSkin:Embed(source="img/mainLeftScrollBar/bar_bottom.png");
downArrowDisabledSkin:Embed(source="img/mainLeftScrollBar/bar_bottom.png");

upArrowUpSkin:Embed(source="img/mainLeftScrollBar/bar_top.png");
upArrowOverSkin:Embed(source="img/mainLeftScrollBar/bar_top.png");
upArrowDownSkin:Embed(source="img/mainLeftScrollBar/bar_top.png");
upArrowDisabledSkin:Embed(source="img/mainLeftScrollBar/bar_top.png");

thumbDownSkin:Embed(source="img/mainLeftScrollBar/bar_middle_down.png",scaleGridLeft="2",scaleGridTop="2",scaleGridRight="12",scaleGridBottom="26");
thumbUpSkin:Embed(source="img/mainLeftScrollBar/bar_middle.png",scaleGridLeft="2",scaleGridTop="2",scaleGridRight="12",scaleGridBottom="26");
thumbOverSkin:Embed(source="img/mainLeftScrollBar/bar_middle_over.png",scaleGridLeft="2",scaleGridTop="2",scaleGridRight="12",scaleGridBottom="26");

trackSkin:Embed(source="img/mainLeftScrollBar/bar_bg.png",scaleGridLeft="2",scaleGridTop="2",scaleGridRight="12",scaleGridBottom="26");
}

 

隐藏Flex滚动条的箭头和滑竿

 

.myCustomScrollBarStyleName {
downArrowSkin: ClassReference(null);
upArrowSkin: ClassReference(null);
thumbSkin: ClassReference(null);
}

 

技术分享

Flex:自定义滚动条样式/隐藏上下箭头