Notifications
Clear all

[Closed] checkbox help

hi,
how can i do different action based on checkbox marked?
in my test script i can see my checkbox state changing,
but i keep getting “No”…
what have i miss?
how can i press the button,and it will
execute one thing if its true and anther
if false?

thanx

try(destroyDialog rlt_boxer)catch()
global rlt_boxer

rollout rlt_boxer "boxer"
(
	
	button btntest "Test" across:1 	
	checkbox myCheckBox "myCheckBox" across:1 
	
	
		on btntest pressed do -- do an action base on the checkbox
	(
		if myCheckBox == true then 
		(
			print "yes"
		)
		else
		(
			print "no"
		)
			
	) --End btntest
	
	
	on myCheckBox changed theState do -- test the checkbox state
	(
		print ("myCheckBox-" + theState as string)
		 
	)	--End of mycheckbox state
) -- End of rollout

createDialog rlt_boxer 150 50

2 Replies
 lo1
if myCheckBox[B].checked[/B] == true then ...

or simply

if myCheckBox[B].checked[/B] then ...

:banghead: So simple
thanks