| Pakiet | fl.controls |
| Klasa | public class ButtonLabelPlacement |
| Dziedziczenie | ButtonLabelPlacement Object |
| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flash CS3 |
| Wersje środowiska wykonawczego: | Flash Player 9.0.28.0, AIR 1.0 |
labelPlacement składnika Button, CheckBox lub RadioButton.
Powiązane elementy interfejsu API
Właściwości publiczne
Metody publiczne
Stałe publiczne
| Stała | Zdefiniowane przez | ||
|---|---|---|---|
| BOTTOM : String = "bottom" [statyczny]
Etykieta jest wyświetlana pod ikoną. | ButtonLabelPlacement | ||
| LEFT : String = "left" [statyczny]
Etykieta jest wyświetlana po lewej stronie ikony. | ButtonLabelPlacement | ||
| RIGHT : String = "right" [statyczny]
Etykieta jest wyświetlana po prawej stronie ikony. | ButtonLabelPlacement | ||
| TOP : String = "top" [statyczny]
Etykieta jest wyświetlana nad ikoną. | ButtonLabelPlacement | ||
Szczegół stałej
BOTTOM | Stała |
public static const BOTTOM:String = "bottom"| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flash CS3 |
| Wersje środowiska wykonawczego: | Flash Player 9.0.28.0, AIR 1.0 |
Etykieta jest wyświetlana pod ikoną.
LEFT | Stała |
public static const LEFT:String = "left"| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flash CS3 |
| Wersje środowiska wykonawczego: | Flash Player 9.0.28.0, AIR 1.0 |
Etykieta jest wyświetlana po lewej stronie ikony.
RIGHT | Stała |
public static const RIGHT:String = "right"| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flash CS3 |
| Wersje środowiska wykonawczego: | Flash Player 9.0.28.0, AIR 1.0 |
Etykieta jest wyświetlana po prawej stronie ikony.
TOP | Stała |
public static const TOP:String = "top"| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flash CS3 |
| Wersje środowiska wykonawczego: | Flash Player 9.0.28.0, AIR 1.0 |
Etykieta jest wyświetlana nad ikoną.
Przykłady Sposób korzystania z tego przykładu
ButtonLabelPlacementExample.as
Poniższy przykład demonstruje możliwe wartości klasy 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();
}
}
Tue Jun 12 2018, 12:06 PM Z
Ukryj dziedziczone właściwości publiczne
Pokaż dziedziczone właściwości publiczne