API version 1
- ‐
RClicked¶
アイテムがマウスの右ボタンでクリックされた時に発生します。
RClickedイベントのEventオブジェクトは以下の構造を持ちます。
型 |
名前 |
説明 |
---|---|---|
integer |
xPos |
マウスポインタのx座標 |
integer |
yPos |
マウスポインタのy座標 |
boolean |
shiftKey |
Shiftキーが押されている場合はtrue、それ以外はfalse |
boolean |
ctrlKey |
Ctrlキーが押されている場合はtrue、それ以外はfalse |
boolean |
altKey |
Altキーが押されている場合はtrue、それ以外はfalse |
使用例
CRSダウンロード
Form ListItem_use {
X = 0;
Y = 0;
Width = 765;
Height = 494;
ListBox ListBox1 {
x = 78;
y = 78;
width = 120;
height = 63;
ListItem ListItem1[3] {
for (var i = 0; i < 3; i++) {
this[i].title = "item[" + str(i) + "]";;
this[i].value = i;
}
}
}
Button Button1 {
x = 87;
y = 10;
width = 96;
height = 39;
Title = "Clear";
TabIndex = 2;
Function OnTouch( e ) {
try {
^.T.clear();
} catch (e) {
messageBox("Message=" + str(e.Message) + "\r\nCategory=" + str(e.Category) + "\r\nCode="+ str(e.Code) + "\r\nSubCode=" + str(e.subCode));
}
}
}
EditBox T {
x = 39;
y = 178;
width = 558;
height = 149;
Border = BORDER_FLATSUNKEN;
SkipTabFocus = TRUE;
Number idx = 0;
Reference tmp_ref;
Function add(ev) {
idx++;
var s = "";
var ma = _enumProps(ev);
var tmp;
tmp_ref = ev;
for (var n in ma) {
if (s.length) {
if (ma[n].name!="from") s += ", ";
}
var name = ma[n].name;
var type = ma[n].type;
if (ma[n].name!="from"){
s += ma[n].name;
}
if(type == "string" || type == "integer" || type == "number" || type == "bool" || type == "date" || type == "fixed"|| type == "" ) {
s += "=" + str(eval("tmp_ref.value." + name + ";"));
}
}
Value = String.format("%1 %2.%3(%4)\n", str(idx), ev.from.name, ev.eventName, s) + Value;
}
}
Function show(ev) {
T.add(ev);
}
Array arrevent;
Function OnShow(ev) {
show(arrevent[0]);
}
Function PostShowEvent(ev) {
arrevent[0] = ev;
PostEvent(new Event("Show"));
}
Function OnTouch(ev) {
show(ev);
}
Function OnRClicked(ev) {
show(ev);
}
Function OnDoubleClicked(ev) {
show(ev);
}
ListBox ListBox4 {
x = 218;
y = 82;
Width = 100;
Height = 60;
this.SelectionMode = MODE_MULTI;
ListItem obj1[3] {
try {
for (var i = 0; i < 3; i++) {
this[i].title = "item[" + str(i) + "]";
this[i].value = i;
}
this[0].Selected = true;
this[1].Selected = true;
} catch (e) {
^.messageBox("Message=" + str(e.Message) + "\r\nCategory=" + str(e.Category) + "\r\nCode="+ str(e.Code) + "\r\nSubCode=" + str(e.subCode));
}
}
}
}