Checkmarks in option button

Ken Ray kray at sonsothunder.com
Thu Nov 20 23:12:27 EST 2003


> Problem 1. The button displays the first option even if the user 
> selects another. Something in the script is preventing the button 
> from displaying the chosen item as its label because when I comment 
> out the script the button works fine, although of course, no 
> checkmarks.

The reason for this is that any time you affect the contents of the
button (either by replacing it or inserting text to it somewhere), it
resets the menuHistory to 1. So you'd want to store the menuHistory on
mousedown, and restore it after your menuPick.
 
> Problem 2. The checkmarks show up as !c rather than as checkmarks. 
> Something bad has happened to the conversion of !c into a checkmark. 
> The same problem occurs if I try !r (an attempt to get a diamond 
> instead of a checkmark).
> 
> Checkmarks have worked for me in the past. Is this a new 
> issue with Rev 2.1.2?

It's an issue with option buttons. You can do it in a popup or pulldown,
but option buttons don't let you do that (unless you're really clever).
Take a look at RevZilla
(http://www.sonsothunder.com/devres/revolution/downloads/RevZilla.htm)
and in the Search dialog in the bottom section you'll see what appears
to be checkmarks in option buttons. What it really is is a group that
includes an option button AND a popup button, and the popup button's
menu is being called "remotely" from the option button and its top-left
relocated based on the current menuhistory. It took me a while to figure
it out, but if you want to use it, feel free. Just open stack "Search"
and click on (say) the option menu next to "Status" (which is the
group), ungroup it, and poke around a bit.

If you have any questions, feel free to contact me off-list.

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 




More information about the use-livecode mailing list