home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 22
/
CD_ASCQ_22_0695.iso
/
win
/
prg
/
lb11wi
/
checkbox.bas
< prev
next >
Wrap
BASIC Source File
|
1993-02-07
|
752b
|
45 lines
' This code demonstrates how to use checkboxes in your
' Liberty BASIC programs
nomainwin
button #1, " &Ok ", [quit], UL, 120, 90
checkbox #1.cb, "I am a checkbox", [set], [reset], 10, 10, 130, 20
button #1, " Set ", [set], UL, 10, 50
button #1, " Reset ", [reset], UL, 50, 50
textbox #1.text, 10, 90, 100, 24
WindowWidth = 180
WindowHeight = 160
open "Checkbox test" for dialog as #1
[inputLoop]
input r$
[set]
print #1.cb, "set"
goto [readCb]
[reset]
print #1.cb, "reset"
goto [readCb]
end
[readCb]
print #1.cb, "value?"
input #1.cb, t$
print #1.text, "I am "; t$
goto [inputLoop]
[quit]
close #1
end