更改Flex tree 滾動條樣式

效果如圖:


樣式:

<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"

發佈了74 篇原創文章 · 獲贊 28 · 訪問量 22萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章