Need a little guidance on adding a dynamic menu

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Need a little guidance on adding a dynamic menu

Post by shawnblc » Fri Oct 11, 2013 1:54 am

I need a little guidance on adding a dynamic menu. I imported an image as a control and have it in a navar. I'd like to make it a dynamic menu with perhaps 3 or 4 items under it.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Need a little guidance on adding a dynamic menu

Post by Simon » Fri Oct 11, 2013 2:17 am

Not exactly sure what you are looking for but take a look at this:
http://forums.runrev.com/phpBB2/viewtop ... 49&t=17212

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Re: Need a little guidance on adding a dynamic menu

Post by shawnblc » Fri Oct 11, 2013 2:24 am

Hey Simon. Looking for something like this (see attached image). I imported an image as a control to start with. By the way this is a desktop app.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Need a little guidance on adding a dynamic menu

Post by Simon » Fri Oct 11, 2013 2:32 am

Hi,
it looks like the example I gave ... or maybe I'm misunderstanding?
An image with an animated dropdown?? No?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Re: Need a little guidance on adding a dynamic menu

Post by shawnblc » Fri Oct 11, 2013 2:46 am

Simon wrote:Hi,
it looks like the example I gave ... or maybe I'm misunderstanding?
An image with an animated dropdown?? No?

Simon
Yup! Just downloaded the example in that thread! That definitely looks like what I was after. Thank you!

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Need a little guidance on adding a dynamic menu

Post by Simon » Fri Oct 11, 2013 2:57 am

There is some code in there that should be better.
I used "hard" numbers e.g. tLeft,137 which isn't really good coding.
It should have something like "the bottom of me" so that the number of dropdown buttons doesn't matter. I think any time you can use topLeft, bottom, right etc. you should. I think it's what they call "Robust code", move it anywhere and it still performs the same.
If you do figure out a robust version would you care to post it?

At any rate, glad it helps. :)

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Re: Need a little guidance on adding a dynamic menu

Post by shawnblc » Fri Oct 11, 2013 3:00 am

Simon wrote:There is some code in there that should be better.
I used "hard" numbers e.g. tLeft,137 which isn't really good coding.
It should have something like "the bottom of me" so that the number of dropdown buttons doesn't matter. I think any time you can use topLeft, bottom, right etc. you should. I think it's what they call "Robust code", move it anywhere and it still performs the same.
If you do figure out a robust version would you care to post it?

At any rate, glad it helps. :)

Simon

I sure will. Thanks again.

shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Re: Need a little guidance on adding a dynamic menu

Post by shawnblc » Fri Oct 11, 2013 4:49 am

Not quite sliding, but I do have it so you can move it around the screen. I'm sure my code is terrible (what little there is). lol
Maybe we can get it sliding. I tried to do a dissolve just to make it more noticeable, but it's not working.

see attachment.

shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Re: Need a little guidance on adding a dynamic menu

Post by shawnblc » Fri Oct 11, 2013 5:11 am

Here's the latest, got the slide working too :)

If anyone improves it please post the update in this thread. Thanks.

shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Re: Need a little guidance on adding a dynamic menu

Post by shawnblc » Fri Oct 11, 2013 5:33 am

Here's another one. Click on the submenus. :)

Post Reply