"Arming" a pulldown menu button -- a hack

Sivakatirswami katir at hindu.org
Wed Mar 22 19:29:31 EST 2006

As we know, at least on Mac OSX, for a pulldown menu button, setting  
the autoArm, autohilite and Armed to true and applying a different  
icon to those states does not take effect. Nothing happens.. Worse:  
In fact one of those properties, if set to true, interferes with the  
proper action (menu does not open) So, we see now why those  
properties are not offered in the inspector for such menu buttons.

So, I tried this work around... and it seems to work just  fine...

on mousewithin
   set the icon of me to 1115
end mousewithin
on mouseleave
    set the icon of me to 1114
end mouseleave

on menuPick pItemChosen

switch pItemChosen
## do stuff here

end switch
end menupick

Does anyone know if there are any caveats to this? the two mouse  
activity handlers to not see to interfere at all with functionality.


More information about the Use-livecode mailing list