For any of the basic menu elements, the process is the same.
1) Create a form (menu).
setup alignment, font, and size for text
optionally create a panel (it helps with menu control later)
create the checkboxes in the panel
make the form visible
2) In your logic that processes your script, you will 'get' the values of the menu element.
It could be a checkbox, radio button, edit, combo box or listbox - it is the same for any of these, so no reason to say otherwise.
Now you act on the value you retreived.
Here is a simple menu with a few check boxes:
gosub formM4yH3m
while #menubutton <> formM4yH3m
{
menu get chk1
set %checkbox1 #menures
menu get chk2
set %checkbox2 #menures
gosub ProcessMenuOptions
}
halt
sub ProcessMenuOptions
if %checkbox1 = #false && %checkbox2 = #true
{
menu setprop status alignment 1
menu setprop chk2 alignment 1
menu setprop status text Right
}
if %checkbox1 = #true && %checkbox2 = #false
{
menu setprop status alignment 0
menu setprop chk1 alignment 0
menu setprop status text Left
}
if %checkbox1 = %checkbox2
{
menu setprop status alignment 2
menu setprop chk1 alignment 2
menu setprop chk2 alignment 2
menu setprop status text Centered
}
return
sub FormM4yH3m
menu form formM4yH3m 100 100 500 250 Example checkboxes
menu setprop formM4yH3m visible #true
menu setdef fontname MS Sans Serif
menu setdef alignment 2 ; 0 = left, 1 = right, 2 = center
menu text status 50 10 text$text
; syntax for check box parameters:
;menu Check {name} {x} {y} {width} {height} {checked} {text}
menu panel Panel1 10 50 400 150
menu check chk1 10 10 300 15 #false Check box 1 (left)
menu check chk2 10 30 300 15 #true Check box 2 (right)
return
Gaderian
I have no real answer on why it dances across the screen, but this was just to show some of the options. Apparently I did something wrong in there on my choices. It gives you something to play with.