Checkmarks in option button

Sarah sarahr at genesearch.com.au
Thu Nov 20 22:06:37 EST 2003


On 21 Nov 2003, at 9:47 am, Michael J. Lew wrote:

> I've got an option button with a small list of options and I want to 
> put a checkmark in front of the options that my users have explored. 
> There is a cookbook recipe that sounds ideal:
>
<snipped code>
>
> If I have that in an option button then two things happen that seem 
> wrong.
>
> 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.
>
> 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?
>
> Has anyone else found this?
>
Using Rev 2.1.2 and Mac OS X 10.3.1 I find that checkmarks are only 
displayed in pulldown or popup menus - not in any of the other menu 
type buttons.
If you switch to either of these types, you will find that the chosen 
item does not get displayed automatically, so add a line to the bottom 
of your menuPick script:
	set the label of me to theItem

You will be accumulating checkmarks as your user's select various 
options, but a quick way to clear them all is a one-liner:
	replace "!c" with "" in btn "MyMenu"

Cheers,
Sarah
sarahr at genesearch.com.au
http://www.troz.net/Rev/



More information about the use-livecode mailing list