我通过使用 spark TextArea 和 Vertical Scroll Bar 的皮肤解决了这个问题。此外,您还必须从该皮肤中对每个按钮进行皮肤处理。
<?xml version="1.0" encoding="utf-8"?>
<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:fb="http://ns.adobe.com/flashbuilder/2009">
<fx:Metadata>
<![CDATA[
[HostComponent("spark.components.VScrollBar")]
]]>
</fx:Metadata>
<s:states>
<s:State name="normal" />
<s:State name="disabled" />
<s:State name="inactive" />
</s:states>
<s:Group top="2" horizontalCenter="0" bottom="2" left="2" right="2">
<s:Button id="track" top="8" bottom="8" width="10" focusEnabled="false"
skinClass="skins.scroller.VerticalScrollBarTrackSkin"/>
<s:Button id="thumb" horizontalCenter="0" focusEnabled="false" visible.inactive="false"
skinClass="skins.scroller.VerticalScrollBarThumbSkin" buttonMode="true"/>
<s:Button id="decrementButton" top="0" enabled.inactive="false"
focusEnabled="false" horizontalCenter="0" buttonMode="true"
skinClass="skins.scroller.VerticalScrollBarDecrementButtonSkin"/>
<s:Button id="incrementButton" bottom="0" enabled.inactive="false"
focusEnabled="false" horizontalCenter="0" buttonMode="true"
skinClass="skins.scroller.VerticalScrollBarIncrementButtonSkin"/>
</s:Group>
</s:SparkSkin>
然后您必须将样式应用于您的应用程序。
s|VScrollBar
{
skinClass:ClassReference("skins.scroller.VerticalScrollBarSkin");
}