读书人

[转]NumericStepper平添百分号

发布时间: 2012-09-19 13:43:54 作者: rapoo

[转]NumericStepper添加百分号

  • ? ?? ?? ?? ???paddingLeft="3" paddingTop="6"
  • ? ?? ?? ?? ???paddingRight="6" paddingBottom="3"/>

  • ? ? ? ? <s:Label text="%" verticalAlign="middle" right="3" top="1" bottom="1"??/>
  • .....复制代码textDisplay.right = 14 + 1;
    了拉右的空白 % 用
    1. ...
    2. ? ?? ???override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
    3. ? ?? ???{
    4. ? ?? ?? ?? ?if (getStyle("borderVisible") == true)
    5. ? ?? ?? ?? ?{
    6. ? ?? ?? ?? ?? ? border.visible = true;
    7. ? ?? ?? ?? ?? ? shadow.visible = true;
    8. ? ?? ?? ?? ?? ? background.left = background.top = background.right = background.bottom = 1;
    9. ? ?? ?? ?? ?? ? textDisplay.left = textDisplay.top = textDisplay.right = textDisplay.bottom = 1;
    10. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? textDisplay.right = 14 + 1;
    11. ? ?? ?? ?? ?}
    12. ? ?? ?? ?? ?else
    13. ? ?? ?? ?? ?{
    14. ? ?? ?? ?? ?? ? border.visible = false;
    15. ? ?? ?? ?? ?? ? shadow.visible = false;
    16. ? ?? ?? ?? ?? ? background.left = background.top = background.right = background.bottom = 0;
    17. ? ?? ?? ?? ?? ? textDisplay.left = textDisplay.top = textDisplay.right = textDisplay.bottom = 0;
    18. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? textDisplay.right = 10;
    19. ? ?? ?? ?? ?}
    20. ? ?? ?? ?? ?
    21. ? ?? ?? ?? ?borderStroke.color = getStyle("borderColor");
    22. ? ?? ?? ?? ?borderStroke.alpha = getStyle("borderAlpha");
    23. ? ?? ?? ?? ?
    24. ? ?? ?? ?? ?super.updateDisplayList(unscaledWidth, unscaledHeight);
    25. ? ?? ???}
    26. ....
    复制代码最後示效果像

  • 读书人网 >Web前端

    热点推荐