API version 1
- ‐
RW
boolean
selected¶
項目の選択状態です。
選択されている場合はtrue、選択されていない場合はfalseになります。
値の設定によりComboBoxの選択項目が変更された場合、Touchイベントが発生します。
初期値はfalseです。
関連項目
ComboBox.listIndex プロパティ
使用例
CRSダウンロード
Form ComboBox {
x = 0;
y = 0;
width = 569;
height = 449;
Label Label11 {
x = 48;
y = 50;
width = 90;
height = 13;
value = "dropdownWidth";
}
TextBox TextBox11 {
x = 140;
y = 50;
width = 80;
height = 20;
Value = "200";
}
Button Button11 {
x = 230;
y = 50;
width = 60;
height = 20;
title = "SET";
Function OnTouch(e) {
try {
^.ComboBox2.dropdownWidth = ^.TextBox11.value;
}
catch(e) {
MessageBox("Message=" + str(e.Message) + "\r\nCategory=" + str(e.Category) + "\r\nCode="+ str(e.Code) + "\r\nSubCode=" + str(e.subCode));
}
}
}
Label Label21 {
x = 81;
y = 85;
width = 57;
height = 19;
value = "listIndex";
}
TextBox TextBox21 {
x = 140;
y = 85;
width = 80;
height = 20;
value = 2;
}
Button Button21 {
x = 230;
y = 85;
width = 60;
height = 20;
title = "SET";
Function OnTouch(e) {
try {
var inx = ^.TextBox21.value;
^.ComboBox2.listIndex = inx ;
^.ComboBox2.ComboItem10[inx].selected = TRUE ;
}
catch(e) {
MessageBox("Message=" + str(e.Message) + "\r\nCategory=" + str(e.Category) + "\r\nCode="+ str(e.Code) + "\r\nSubCode=" + str(e.subCode));
}
}
}
Label Label31 {
x = 39;
y = 120;
width = 100;
height = 17;
value = "maxVisibleItems";
}
TextBox TextBox31 {
x = 140;
y = 120;
width = 80;
height = 20;
value = 5;
}
Button Button31 {
x = 230;
y = 120;
width = 60;
height = 20;
title = "SET";
Function OnTouch(e) {
try {
^.ComboBox2.maxVisibleItems = ^.TextBox31.value;
}
catch(e) {
MessageBox("Message=" + str(e.Message) + "\r\nCategory=" + str(e.Category) + "\r\nCode="+ str(e.Code) + "\r\nSubCode=" + str(e.subCode));
}
}
}
Label Label41 {
x = 8;
y = 17;
width = 324;
height = 25;
value = "数字を入れてセットを押してしてからコンボ表示を確認します";
}
Button Button41 {
x = 25;
y = 170;
width = 100;
height = 20;
title = "show";
Function OnTouch(e) {
try {
^.ComboBox2.show(TRUE);
Application._sleep(3000);
^.ComboBox2.show(FALSE);
}
catch(e) {
MessageBox("Message=" + str(e.Message) + "\r\nCategory=" + str(e.Category) + "\r\nCode="+ str(e.Code) + "\r\nSubCode=" + str(e.subCode));
}
}
}
ComboBox ComboBox2 {
x = 147;
y = 170;
width = 110;
height = 20;
DropDownKey = KEY_F01 ;
SelectionMode = MODE_CLEARABLE;
Editable = true;
ComboItem ComboItem10[11];
ComboItem10[0].title = "00000";
ComboItem10[1].title = "11111";
ComboItem10[2].title = "22222";
ComboItem10[3].title = "33333";
ComboItem10[4].title = "44444";
ComboItem10[5].title = "55555";
ComboItem10[6].title = "66666";
ComboItem10[7].title = "77777";
ComboItem10[8].title = "88888";
ComboItem10[9].title = "99999";
ComboItem10[10].title = "";
}
Label Label3 {
x = 27;
y = 195;
width = 308;
height = 17;
value = "※3秒後に閉じる F01をdropdownKeyに指定";
fgColor = "#ff0000ff";
}
}