|
Post by jarychk on Jun 29, 2024 19:22:16 GMT
Sample program code is for learning or relearning how to write code for CHECKBOX control. The program takes user input and reexpresses this input, as an output. That's all! No other processing!
'short, simple, checkbox control study 'also see that initialized variable moneyunit$ is slightly different than as in most of the example program. moneyunit$="other money units" q$="0"
nomainwin
WindowWidth = 550 WindowHeight = 410 UpperLeftX=int((DisplayWidth-WindowWidth)/2) UpperLeftY=int((DisplayHeight-WindowHeight)/2)
textbox #main.textbox1, 38, 76, 100, 25 checkbox #main.checkbox2, "as dollars", [checkbox2Set], [checkbox2Reset], 174, 81, 96, 20 button #main.button3, "express!", [button3Click], UL, 302, 76, 122, 25 statictext #main.statictext4, "StaticText Caption", 30, 226, 174, 20 open "checkbox study" for window as #main print #main, "trapclose [quit.main]"
print #main, "font ms_sans_serif 10"
wait
[quit.main] Close #main END
[checkbox2Set] 'Perform action for the checkbox named 'checkbox2' 'Insert your own code here moneyunit$="dollars" wait
[checkbox2Reset] 'Perform reset for the checkbox named 'checkbox2' 'Insert your own code here moneyunit$="Other Money Units" wait
[button3Click] 'Perform action for the button named 'button3' 'Insert your own code here print #main.textbox1,"!contents? q$" print #main.statictext4, q$+" ";moneyunit$ wait
|
|