#module
#deffunc combox_index int
mref id, 0
mref stt, 64
objsend id, 0x0147, 0, zero // コンボ選択アイテムを取得
return stat
#deffunc combox_add int, str
mref id, 0 : mref string, 33
s = string
objsend id, 0x0143, 0, s // コンボアイテムを追加
return
#deffunc combox_ins int, str, int
mref id, 0 : mref string, 33 : mref no, 2
s = string
objsend id, 0x014A, no, s // コンボアイテムを挿入
return
#deffunc combox_del int, int
mref id, 0 : mref no, 1
objsend id, 0x0144, no, nonuse // コンボアイテムを削除
return
#global
objsize 150, 20
pos 10, 10
button "追加", *combo
button "挿入", *combo
button "削除", *combo
pos 10, 100 : combox index.0, 200, "コンボ既存1\nコンボ既存2\nコンボ既存3" // オブジェクトID:3
stop
*combo
// 押されたボタンの処理を行う
btnid = stat
combox_index 3 : no = stat
switch btnid
case 0: cmb.0++ : combox_add 3, "コンボ追加" + cmb.0 : swbreak
case 1: cmb.1++ : combox_ins 3, "コンボ挿入" + cmb.1, no : swbreak
case 2: combox_del 3, no : swbreak
swend
stop
|