fl.controls
public class ButtonLabelPlacement
继承ButtonLabelPlacement Inheritance Object

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9.0.28.0

ButtonLabelPlacement 类可定义 Button、CheckBox 或 RadioButton 组件的 labelPlacement 属性值的常量。

查看示例

另请参见

LabelButton.labelPlacement



公共 属性
 属性定义方
 Inheritedconstructor : Object
对类对象或给定对象实例的构造函数的引用。
Object
 Inheritedprototype : Object
[static] 对类或函数对象的原型对象的引用。
Object
公共 方法
 方法定义方
 Inherited
指示对象是否已经定义了指定的属性。
Object
 Inherited
指示 Object 类的实例是否在指定为参数的对象的原型链中。
Object
 Inherited
指示指定的属性是否存在、是否可枚举。
Object
 Inherited
设置循环操作动态属性的可用性。
Object
 Inherited
返回指定对象的字符串表示形式。
Object
 Inherited
返回指定对象的原始值。
Object
公共 常量
 常量定义方
  BOTTOM : String = "bottom"
[static] 标签将显示在图标的下方。
ButtonLabelPlacement
  LEFT : String = "left"
[static] 标签将显示在图标的左侧。
ButtonLabelPlacement
  RIGHT : String = "right"
[static] 标签将显示在图标的右侧。
ButtonLabelPlacement
  TOP : String = "top"
[static] 标签将显示在图标的上方。
ButtonLabelPlacement
常量详细信息
BOTTOM常量
public static const BOTTOM:String = "bottom"

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9.0.28.0

标签将显示在图标的下方。

LEFT常量 
public static const LEFT:String = "left"

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9.0.28.0

标签将显示在图标的左侧。

RIGHT常量 
public static const RIGHT:String = "right"

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9.0.28.0

标签将显示在图标的右侧。

TOP常量 
public static const TOP:String = "top"

语言版本 : ActionScript 3.0
Player 版本 : Flash Player 9.0.28.0

标签将显示在图标的上方。

示例 如何使用示例

下例演示了 ButtonLabelPlacement 类的可能值:

package {
    import fl.controls.Button;
    import fl.controls.ButtonLabelPlacement;
    import flash.display.Sprite;

    public class ButtonLabelPlacementExample extends Sprite {
        private var topButton:Button;
        private var bottomButton:Button;
        private var leftButton:Button;
        private var rightButton:Button;
        
        public function ButtonLabelPlacementExample() {
            // ButtonLabelPlacement.TOP
            var topButton:Button = new Button();
            topButton.setStyle("icon", Icon);
            topButton.labelPlacement = ButtonLabelPlacement.TOP;
            topButton.label = ButtonLabelPlacement.TOP;
            topButton.move(10, 10);
            topButton.setSize(120, 120);
            addChild(topButton);
            
            // ButtonLabelPlacement.BOTTOM
            var bottomButton:Button = new Button();
            bottomButton.setStyle("icon", Icon);
            bottomButton.labelPlacement = ButtonLabelPlacement.BOTTOM;
            bottomButton.label = ButtonLabelPlacement.BOTTOM;
            bottomButton.move(140, 10);
            bottomButton.setSize(120, 120);
            addChild(bottomButton);
            
            // ButtonLabelPlacement.LEFT
            var leftButton:Button = new Button();
            leftButton.setStyle("icon", Icon);
            leftButton.labelPlacement = ButtonLabelPlacement.LEFT;
            leftButton.label = ButtonLabelPlacement.LEFT;
            leftButton.move(270, 10);
            leftButton.setSize(120, 120);
            addChild(leftButton);
            
            // ButtonLabelPlacement.RIGHT
            var rightButton:Button = new Button();
            rightButton.setStyle("icon", Icon);
            rightButton.labelPlacement = ButtonLabelPlacement.RIGHT;
            rightButton.label = ButtonLabelPlacement.RIGHT;
            rightButton.move(400, 10);
            rightButton.setSize(120, 120);
            addChild(rightButton);
        }
    }
}

import flash.display.Sprite;

class Icon extends Sprite {
    public function Icon() {
        this.graphics.beginFill(0xFF0000);
        this.graphics.drawRect(0, 0, 20, 20);
        this.graphics.endFill();
    }
}




 

评论添加到页面后给我发送电子邮件 | 评论报告

当前页: http://livedocs.adobe.com/flash/9.0_cn/ActionScriptLangRefV3/fl/controls/ButtonLabelPlacement.html