API version 1
- ‐
RW
boolean
selected¶
アイテムの選択状態を設定します。
trueなら選択、falseなら非選択となります。
初期値はfalseです。
関連項目
使用例
CRSダウンロード
ダウンロード(IconView_icon11.png)
ダウンロード(IconView_icon12.png)
Form IconViewItem_properties {
x = 0;
y = 0;
width = 800;
height = 600;
IconView iconView1 {
x = 8;
y = 8;
width = 640;
height = 480;
selectionMode = MODE_MULTI;
checkboxes = true;
IconViewItem items[2] {
var ic1 = new Image();
ic1.loadImage("IconView_icon11.png");
# アイコン画像を設定します
this[0].icon = ic1;
# タイトルを設定します
this[0].title = "foo1";
# チェックボックスにチェックを入れます
this[0].checked = true;
# 選択状態にします
this[0].selected = true;
# value プロパティ に123を設定します
this[0].value = 123;
var ic2 = new Image();
ic2.loadImage("IconView_icon12.png");
this[1].icon = ic2;
this[1].title = "foo2";
this[1].value = 456;
function onTouch(e) {
print("アイテム " + e.from.title + " (value=" + str(e.from.value) + ") の選択状態が変更されました。現在の selected: " + str(e.from.selected));
}
function onCheckChanged(e) {
print("アイテム " + e.from.title + " (value=" + str(e.from.value) + ") のチェックボックスがクリックされました。現在の checked: " + str(e.from.checked));
}
};
}
}