Images Instead of Choices in Pulldown Menus

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
deeverd
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 165
Joined: Mon Jul 16, 2007 11:58 pm

Images Instead of Choices in Pulldown Menus

Post by deeverd » Thu Jun 25, 2015 12:18 am

Hello Forum,

A recent challenge I've been having is trying to find out if it is possible to put images into a pulldown menu. In other words, in the properties section of the pulldown menu where one would ordinarily have "Choice 1," "Choice 2," "Choice 3," etc., is there some way to have small images for users to click on instead of just using text?

Specifically, I'd like users to be able to use a pulldown menu that showed a variety of possible wallpaper images that they could set for a backdrop rather than just having the name of the wallpaper style in text.

This might be an impossible task but it would be great if it were possible.

Thanks in advance for any insights any one can offer.

Cheers,
deeverd

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Images Instead of Choices in Pulldown Menus

Post by FourthWorld » Thu Jun 25, 2015 12:31 am

A bit of work, but doable: you can build menu items within a stack, and have the stack popup when a menu button is clicked by using either the popup command or setting the menu button's menuName property to the name of the stack you want to appear.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

deeverd
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 165
Joined: Mon Jul 16, 2007 11:58 pm

Re: Images Instead of Choices in Pulldown Menus

Post by deeverd » Thu Jun 25, 2015 1:40 am

Hello Richard Gaskin,

Thanks for the advice. I'll start experimenting along those lines.

I'm guessing then that there is no way to use a command such as setting the imageSource to "Choice 1" etc.

Oh well, I'll do it the hard way and start building that menu substack.

Cheers,
deeverd

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Images Instead of Choices in Pulldown Menus

Post by FourthWorld » Thu Jun 25, 2015 1:54 am

No simple solution available at this time, but I think you'll find the flexibility of stack menus very satisfying for gallery pickers like this.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply