Here is a fun little demo that uses a wizard type interface. I developed it in response to a question on one of the public forums. It is not a true wizard in that it uses the same window and controls, but the apearance is good. It is a good vehicle for gathering data in responses to a questionaire, as it demonstrates with a slight "Dilbert" flair. Enjoy...
'** Questionaire Wizard
dim question$(50)
dim scoresi(50)
'setup some stuff
for x = 1 to 5
read a$
question$(x) = a$
next x
qCnt = 0
maxQ = 5
choice = 0
[WindowSetup]
WindowWidth = 410 : WindowHeight = 206
UpperLeftX = INT((DisplayWidth-WindowWidth)/2)
UpperLeftY = INT((DisplayHeight-WindowHeight)/2)
[ControlSetup]
groupbox #wizard.gbx, "Response", 10, 35, 140, 132
statictext #wizard.qtext, question$(qCnt), 10, 10, 440, 20
button #wizard.next, "Next >>",[next],UL, 280, 136, 110, 30
button #wizard.finish, "Finish",[finish],UL, 280, 136, 110, 30
button #wizard.quit, "Quit",[quit],UL, 162, 136, 110, 30
radiobutton #wizard.one, "One (lowest)",[one],[loop], 25, 55, 100, 25
radiobutton #wizard.two, "Two",[two],[loop], 25, 80, 100, 25
radiobutton #wizard.three, "Three",[three],[loop], 25, 105, 100, 25
radiobutton #wizard.four, "Four (highest)",[four],[loop], 25, 130, 100, 25
Open "Questionaire" for Window as #wizard
#wizard "trapclose [quit]"
#wizard "font ms_sans_serif 10"
#wizard.finish "!locate 600 600 0 0"
#wizard "refresh"
gosub [NewQ]
[loop]
Wait
[quit]
close #wizard : END
[next]
scoresi(qCnt) = choice
gosub [NewQ]
if qCnt = maxQ then
#wizard.finish "!locate 280 136 110 30"
#wizard.next "!locate 600 600 0 0"
#wizard "refresh"
end if
goto [loop]
[finish]
'record the last choice
scoresi(qCnt) = choice
'now dump the contents (or do what ever with the array...)
for x = 1 to maxQ
print "Scores ";x;" = ";scoresi(x)
next x
Notice "The test is done. Click OK to exit the program..."
close #wizard
end
[one]
choice = 1
#wizard.one "set"
#wizard.two "reset"
#wizard.three "reset"
#wizard.four "reset"
goto [loop]
[two]
choice = 2
#wizard.one "reset"
#wizard.two "set"
#wizard.three "reset"
#wizard.four "reset"
goto [loop]
[three]
choice = 3
#wizard.one "reset"
#wizard.two "reset"
#wizard.three "set"
#wizard.four "reset"
goto [loop]
[four]
choice = 4
#wizard.one "reset"
#wizard.two "reset"
#wizard.three "reset"
#wizard.four "set"
goto [loop]
[NewQ]
qCnt = qCnt + 1
q$ = str$(qCnt);") " + question$(qCnt)
#wizard.qtext q$
#wizard.one "set"
#wizard.two "reset"
#wizard.three "reset"
#wizard.four "reset"
choice = 1
return
data "I am empowered to do my job","I am a skilled metal worker"
data "My boss is a pointy hair dictator","I love my job"
data "My dog is trying to take over the world"