API version 1
- ‐
toggle¶
オブジェクトのvisibleプロパティの値を切り替えるアニメーションを実行します。
targetプロパティで指定されたオブジェクトの実行時のvisibleプロパティの値がtrueの場合はfalseになるようなアニメーションを行い、falseの場合はtrueになるようなアニメーションを行います。
呼出形式一覧
呼出形式 |
説明 |
---|---|
void toggle() |
visibleプロパティの状態を変えるアニメーションを実行します。 |
戻り値一覧
戻り値 |
説明 |
---|---|
void |
なし |
例外
なし
関連項目
targetプロパティ
使用例
CRSダウンロード
Form AnimationVisible_properties {
X = 0;
Y = 0;
Width = 400;
Height = 300;
Button buttonStart {
x = 8;
y = 8;
width = 104;
height = 24;
title = "実行";
Function OnTouch( e ) {
if (!^.animationvisible1.isAnimating) {
#form1のVisibleを切り替えるアニメーションを実行します
^.animationvisible1.toggle();
}
}
}
Form form1 {
x = 40;
y = 120;
width = 320;
height = 136;
Calendar calendar1 {
x = 15;
y = 7;
width = 192;
height = 112;
}
Button button1[3] {
x = 215;
y = 7;
width = 96;
height = 32;
layoutSpacing = 10;
title = "サンプル";
}
}
AnimationVisible animationvisible1 {
#アニメーションパターンとしてZOOMを指定します
effect = AnimationVisible.EFFECTTYPE_ZOOM;
#ZOOMの消失点として(130,40)の座標を指定します
option = new Array(130,40);
#アニメーション対象としてform1を指定します
target = ^.form1;
}
}