dialog Ulev {
title "ulevel"
size -1 -1 94 73
option dbu
list 1, -1 -1 48 50, size vsbar
list 2, 46 -1 48 50, size vsbar
button "[Add]", 3, 1 50 19 12, flat
button "[Del]", 4, 25 50 19 12, flat
button "[List 1]", 5, 49 50 19 12, flat
button "[List 2]", 6, 73 50 19 12, flat
check "On/Off", 7, 2 63 31 10, flat
}
alias xlev { dialog -md ulev ulev }
on *:dialog:ulev:*:*:{
if ($devent == INIT) {
did -a $dname 1 Adding stuff to list
did -a $dname 2 At Startup :P
;This area of the called INIT is where you put stuff when your dialog starts maybe a stored var or command?
}
elseif ($devent == Sclick) {
if ($did == 3) { did -a $dname 1,2 Added stuff to both list }
;Added item to both list 1 and 2 by using 1 and 2
elseif ($did == 4) { did -r $dname 1 $did($dname,1).sel }
;deleted selected item from list 1
elseif ($did == 5) { did -a $dname 1 Added whatever command or text to list 1 }
elseif ($did == 6) { did -a $dname 2 Added whatever command or text to list 2 }
elseif ($did == 7) {
if (!%this) || (%this == off) { %this = on }
else { %this = off }
;Now you choosed this way to use that checkmark to set a var but its not needed because
;You can check to see if the checkmark is on or off by using $did($dname,7).state
;This will return either 0 or 1 if unchecked or checked :)
}
}
}