checking/unchecking menus after a menu with cascading
moe2 at shaw.ca
moe2 at shaw.ca
Sun Aug 15 14:20:49 EDT 2004
on 2004/08/15 10:59 AM, Frank Leahy at frank at backtalk.com wrote:
> On Aug 15, 2004, at 5:00 PM, use-revolution-request at lists.runrev.com
> wrote:
>
>> From: Ken Ray <kray at sonsothunder.com>
>> Subject: Re: checking/unchecking menus after a menu with cascading
>> menus Re: checking/unchecking menus after a menu with cascading menus
>> To: Use Revolution List <use-revolution at lists.runrev.com>
>> Message-ID: <BD44EF99.3EFC%kray at sonsothunder.com>
>> Content-Type: text/plain; charset="US-ASCII"
>>
>> On 8/15/04 4:46 AM, "Frank Leahy" <frank at backtalk.com> wrote:
>>
>>>
>>> That's correct -- on the Mac (not sure about Windows), disabled and
>>> sub-menu items are always considered unselectable, i.e. when you
>>> release on a disabled menu item or on a sub-menu item, no menu item is
>>> chosen or reported.
>>
>> Well, that's true for disabled menu items, but not for sub-menu items
>> - so
>> long as you remove the "autoarm" property. If you do that, what you
>> get back
>> is the form: <menuItemName>|<subMenuItemName|<subSubMenuItemName>, so
>> in a
>> menu that looks like this:
>>
>> Test
>> SubTest1
>> SubSubTest1
>> SubSubTest2
>> SubTest2
>>
>> If you pick "SubSubTest2", you get back in "menuPick":
>>
>> Tets|SubTest1|SubSubTest2
>>
>> HTH,
>>
>> Ken Ray
>>
>
> Ken,
>
> A misunderstanding of terminology -- I understood the "sub-menu item"
> to mean "SubTest1" in your example above, i.e. the menu item that
> displays the sub-menu. A "sub-menu item" cannot be chosen, and
> therefore yields no MenuPick message,
not true
put this transcript in the button script of a button with submenus and
cascade menus
on menuPick theItem
put theItem & " " & the menuHistory of me
end menuPick
this will show that cascade menuItems as well as menuItems can get a message
sent and intercepted ... so this handler should be able to toggle the
checkMark of any selected menuItem and cascade menuItem
> just as a disabled menu item
> cannot be selected and yields no MenuPick message.
>
> Conversely MenuPick does get called when any menu item in a sub menu is
> chosen, as long as that menu item is not either disabled, or is itself
> a sub-menu item (i.e. causes a sub-sub-menu to appear)
>
> -- Frank
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list