popup button from menu

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

popup button from menu

Post by Garrett » Sun Jul 22, 2007 1:37 am

Seems when I popup a menu from my main menubar, it's turned into a button and no longer a menu.

I assume that I'd need to reset it somehow to return to it's menu form after the popup, but was not able to find the proper reference in the docs.

Anyone able to point me in the right direction in the docs to get this reset back into a menu?

Thanks in advance,
-Garrett

Klaus
Posts: 14206
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Post by Klaus » Sun Jul 22, 2007 10:28 am

Hi Garret,

???

"menus" in Rev ARE in fact buttons, so this is correct behaviour.
Or do I miss something?


Regards

Klaus

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sun Jul 22, 2007 10:54 am

Garrett,

No, you don't need to reset it. Something else must be wrong. Do you have a script that changes the style of the button? Have you created the menu yourself, or have you used the menu builder? How exactly have you created this menu?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Post by Garrett » Sun Jul 22, 2007 11:11 pm

I used the Menu Builder... And here's the code I'm using:

Code: Select all

popup button "Edit"

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Mon Jul 23, 2007 12:10 am

Hi Garret,

The popup command makes an object or stack appear at a particular location. Please read more about the popup command in the docs.

You should use the menupick message to deal with selected menu items. You will quickly see how it works if you let the menu builder create the a script template for you. First click on the button called Auto Script and subsequently click on Edit Script.

Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Post by Garrett » Mon Jul 23, 2007 4:45 am

Apologies, I should've noted that it turns into a popup instead, and the pulldown style is removed when I used the above code.

I merely want to right click in an edit field and have the edit menu popup at that location without changing the main menu's edit menu into a popup style as it is happening now.

Really sorry, but sometimes what I want to say and what I do, don't always come across right. An issue that I suffer from frequently.

Many thanks for the replies,
-Garrett

Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Post by Garrett » Mon Jul 23, 2007 4:55 am

Well, seems I found a resolution to my problem.

Code: Select all

popup button "Edit"
set the menuMode of button "Edit" to pulldown
That puts it back to what it's suppose to be :-)

Again, thanks for all the replies :-)
-Garrett

Post Reply