Simulate a popup menu button
dunbarx at aol.com
dunbarx at aol.com
Tue Jul 17 21:23:13 EDT 2012
Still not quite sure I am getting it. Is it the method of creating submenus that you need?
Place this in the menuItems of your button. The "|" is a delimiter for submenus.
Choice1/|1
Choice2/|2
choice2a/|3
choice3/|4
Choice4/|5
Choice5/|6
Choice6/|7
Craig Newman
-----Original Message-----
From: Lars Brehmer <larsbrehmer at mac.com>
To: use-livecode <use-livecode at lists.runrev.com>
Sent: Tue, Jul 17, 2012 3:55 pm
Subject: Re: Simulate a popup menu button
Thanks Craig!
But I still haven't got it figured out.
This ia a popUp button with several cascading items. What I am trying to do is
in a tutorial animation.
1. move the cursor onto the button and then have the meunu appear (click at the
buttonLoc).
2. move the cursor to the menu choice and have it hilited and show it's
cascaded choices (the problem is that it's not really the cursor, just a button
whose icon looks just like a cursor)
3. move the cursor (= button) to the cascaded (final) choice and hilite it.
4 execute the choice (send "menuPick" && "theChoice" to btn "theButton"
So 1 and 4 are easy and I can't do 2 and 2.
My workaround until now has been to have images of the menu appear with the
desired hilted choices. But if the menu choices are just images, they can't
extend to outside the edge of the stack like a real menu choices can.
Any ideas?
Cheers,
Lars
> Hi.
>
>
> Are you using an actual pop-up style button, like a PullDown or cascade?
>
>
> Or are you rolling your own, as it seems, when you said 'simulate'?
>
>
> If you are making your own, what is the reason to do that?
>
>
> If you are using one of the standard button styles, the usual method is
something like:
>
>
>
> on menuPick pItemName
> switch pItemName
> case "choice 1"
> answer the menuHistory of me
> break
> case "choice 2"
> beep 3
> break
> end switch
> end menuPick
>
>
> Anyway, read the dictionary about the "menuHistory". It is likely what you are
missing.
>
>
> Craig Newman
>>
>>
>> I am trying to simulate the action of using a popup menubutton, but I can't
>> figure out how to do the middle step (if that is even possible)
>>
>> click at the buttonLoc
>>
>> reveals the menu choices and
>>
>> send "menuPick" && "the menu choice"
>>
>> executes the menuPick.
>>
>> But I can't figure out to hilite the menu choice line while the menu is
visible.
>>
>>
>> select menuItem 2
>>
>> doesn't actually hilite the menu line. What am I missing here?
>>
>> Cheers,
>>
>> Lars
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list