[转]NumericStepper平添百分号
[转]NumericStepper添加百分号? ?? ?? ?? ???paddingLeft3 paddingTop6? ?? ?? ?? ???paddingRight
[转]NumericStepper添加百分号
? ?? ?? ?? ???paddingLeft="3" paddingTop="6"
? ?? ?? ?? ???paddingRight="6" paddingBottom="3"/>
? ? ? ? <s:Label text="%" verticalAlign="middle" right="3" top="1" bottom="1"??/>
.....复制代码textDisplay.right = 14 + 1;
為了拉開右邊的空白給 % 用- ...
- ? ?? ???override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
- ? ?? ???{
- ? ?? ?? ?? ?if (getStyle("borderVisible") == true)
- ? ?? ?? ?? ?{
- ? ?? ?? ?? ?? ? border.visible = true;
- ? ?? ?? ?? ?? ? shadow.visible = true;
- ? ?? ?? ?? ?? ? background.left = background.top = background.right = background.bottom = 1;
- ? ?? ?? ?? ?? ? textDisplay.left = textDisplay.top = textDisplay.right = textDisplay.bottom = 1;
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? textDisplay.right = 14 + 1;
- ? ?? ?? ?? ?}
- ? ?? ?? ?? ?else
- ? ?? ?? ?? ?{
- ? ?? ?? ?? ?? ? border.visible = false;
- ? ?? ?? ?? ?? ? shadow.visible = false;
- ? ?? ?? ?? ?? ? background.left = background.top = background.right = background.bottom = 0;
- ? ?? ?? ?? ?? ? textDisplay.left = textDisplay.top = textDisplay.right = textDisplay.bottom = 0;
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? textDisplay.right = 10;
- ? ?? ?? ?? ?}
- ? ?? ?? ?? ?
- ? ?? ?? ?? ?borderStroke.color = getStyle("borderColor");
- ? ?? ?? ?? ?borderStroke.alpha = getStyle("borderAlpha");
- ? ?? ?? ?? ?
- ? ?? ?? ?? ?super.updateDisplayList(unscaledWidth, unscaledHeight);
- ? ?? ???}
- ....
复制代码最後顯示效果像這樣