I didn't want to put these buttons in their own group, because it didn't seem necessary. I thought I would just control the hilite with a script, instead. Also, I didn't want to bother to place the new group on a whole bunch of cards that existed before I made these buttons.
Script for bg btn "Sequenced"
Code: Select all
on mouseUp
if the cantdelete of this card is "true" then
answer "To change this setting, first unlock the lock icon."
exit mouseup
end if
if the hilite of me is false then
set the hilite of me to true
set the hilite of bg btn "un-sequenced" to false
end if
end mouseUp
Code: Select all
on mouseUp
if the cantdelete of this card is "true" then
answer "To change this setting, first unlock the lock icon."
exit mouseup
end if
if the hilite of me is false then
set the hilite of me to true
set the hilite of bg btn "sequenced" to false
end if
end mouseUp
If the cantdelete of the card is "true" and I click on one of the radio buttons when the hilite is true, the hilite changes to false. I can see it change before I get the answer dialog.
Further experimentation shows that if the hilite of a radio button is true and I comment the script out, the hilite still changes to false. In that case, if the hilite is false, it stays false.
I made a new pair of buttons, this time as a separate group, so they will behave as a radio button family. They work the same way as the first pair. I.e., not the way I want to.
I tried various ways to script around this phenomenon, but couldn't come up with one.
It looks like the hilite of the radio buttons change on mouseDown rather than mouseUp
I tried trapping both the mouseDown and the mouseUp.
Code: Select all
On mouseUp
if the cantdelete of this card is "true" then
exit mouseup
end if
if the hilite of me is false and the cantdelete of this card is not "true" then
set the hilite of me to true
set the hilite of bg btn "sequenced" to false
end if
end mouseUp
on mouseDown
if the cantdelete of this card is "true" then
answer "To change this button, first unlock the lock icon."
exit mouseDown
end if
end mouseDown
The debugger shows that the scripts are executing normally.
Apparently, it's not possible to alter the hilite behavior of a radio button with a script. As I recall, I could do that in hyperCard.
My questions:
1-How do I make these radio buttons behave as I want them to?
2-Is this a bug?
Thanks,
Tim
P.S. One thought -- I guess I could copy the icons of hilited and unhilited radio buttons and make them the icons of non-radio buttons. Then change the icons with a script. Would that work?
If so, how do I copy the icons of hilited and un-hilited radio buttons?