Page 1 of 1
Freeze a Checkbox
Posted: Thu Oct 29, 2009 1:30 am
by bidgeeman
Is there a way to have a checkbox "Stay" selected once it is checked?Even if the user clicks on it again?
Thanks
Bidge
Posted: Thu Oct 29, 2009 2:13 am
by gyroscope
Hi Bidge, one way would be:
Code: Select all
on mouseUp
if the hilite of me is true then
exit mouseUp
else
if the hilite of me is false then
set the hilite of me to true
end if
end if
end mouseUp

Posted: Thu Oct 29, 2009 2:48 am
by bidgeeman
Hey thanks Gyro
Cheers
Bidge
Posted: Thu Oct 29, 2009 5:05 am
by mwieder
Bidge-
Not really sure why you'd want to do this, but I can condense gyro's answer even further:
Code: Select all
on mouseUp
set the hilite of me to true
end mouseUp
<g>
Posted: Thu Oct 29, 2009 11:11 am
by Mark
Hi,
Just set the autohilite of the checkbox to false.
Best,
Mark
Posted: Thu Oct 29, 2009 11:11 am
by bn
Bidge,
you confuse the user if you offer him a checkbox and the user can not check it. For the user interface it would be better to disable a checkbox if you want to freeze it.
this dimms the checkbox and the user has a clue that it is not functional. Otherwise the user thinks your program does not work.
regards
Bernd
Posted: Thu Oct 29, 2009 11:12 am
by gyroscope
Not really sure why you'd want to do this, but I can condense gyro's answer even further:
Code: Select all
on mouseUp
set the hilite of me to true
end mouseUp
Doh, again!!

I'd swear in court that that didn't work for me last night! Although in the light of day I see that it must. (I replied at a quarter to 2 in the morning: that is my excuse for the day...

Posted: Thu Oct 29, 2009 10:44 pm
by bidgeeman
Hi.
Explanation: I wanted to make a checkbox that was only selectable once by the user so that they would have to click a "Clear all Fields" button to restart a new seletion.
Many thanks again for all the responses.
Regards
Bidge