icons for menu items?

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
tjo7777
Posts: 34
Joined: Fri May 02, 2014 9:16 pm

icons for menu items?

Post by tjo7777 » Sat Mar 14, 2015 12:50 am

Is there any way to add icons to items displayed in a drop down menu?

If that is not possible, is there any way to set the color of the text for each menu item to a different color?

Ideally I would my drop down menu to look like:

RED (red circle icon here)
GREEN (green circle icon here)
YELLOW (yellow circle icon here)

or:

RED
GREEN
YELLOW

I did a search and saw a post from Klaus back in 2011 indicating that Icons were not yet possible. Just wondering if there have been any advancements in this area, or if I can just change the color of the text for each item in the drop down menu.

Also there was another post that mentioned using a stack panel for Windows. Would a stack panel work in Android?

Thanks for any suggestions or advice,

TJ.

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

Re: icons for menu items?

Post by Simon » Sat Mar 14, 2015 1:09 am

Hi TJ,
For mobile I say roll your own.
Here is an example;
http://forums.livecode.com/phpBB2/viewt ... 212#p86465


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

tjo7777
Posts: 34
Joined: Fri May 02, 2014 9:16 pm

Re: icons for menu items?

Post by tjo7777 » Sat Mar 14, 2015 1:45 am

Thanks Simon,

I will take a look and see if I can figure it out.

TJ.

zaxos
Posts: 222
Joined: Thu May 23, 2013 11:15 pm

Re: icons for menu items?

Post by zaxos » Sat Mar 14, 2015 3:45 pm

You could use a stack as a menu dropDown wich gives you the freedom of adding anything in it.
Knowledge is meant to be shared.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: icons for menu items?

Post by jacque » Sat Mar 14, 2015 4:14 pm

Mobile apps are limited to one stack at a time, so stack panels won't work. You could roll your own with fields or groups.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jiml
Posts: 339
Joined: Sat Dec 09, 2006 1:27 am

Re: icons for menu items?

Post by jiml » Sat Mar 14, 2015 7:55 pm

Perhaps use font characters?


jiml
Posts: 339
Joined: Sat Dec 09, 2006 1:27 am

Re: icons for menu items?

Post by jiml » Sat Mar 14, 2015 7:57 pm

Like:
Stop
Caution
Go

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: icons for menu items?

Post by jacque » Sat Mar 14, 2015 8:51 pm

What a good idea. What font is that?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jiml
Posts: 339
Joined: Sat Dec 09, 2006 1:27 am

Re: icons for menu items?

Post by jiml » Sun Mar 15, 2015 1:45 am

Hi Jacque,

My Mac reports it's Hiragino Kaku Gothic ProN W3.

But you can get typefaces that have tons of icons as characters, such as Font Awesome - http://fontawesome.io
Or Glyphicons - http://glyphicons.com

Jim Lambert

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: icons for menu items?

Post by jacque » Sun Mar 15, 2015 3:56 am

Nice. If the OP uses this idea, we should probably mention that the font needs to be included in the build just in case the end user doesn't have that font installed.

I'll probably use this trick some day.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

tjo7777
Posts: 34
Joined: Fri May 02, 2014 9:16 pm

Re: icons for menu items?

Post by tjo7777 » Mon Mar 16, 2015 4:37 pm

First, thank you everyone for the great replies.

It seems that using a stack gives you the most flexibility. I am assuming you just have a button launch a new stack that will be designed to behave like a drop down menu. I have not tried this yet, but it sounds doable. On mobile, could this be used to make a nice scrolling list similar to scrolling thru a contacts list?

The font idea is very interesting for my current application, and looks like it would be the easiest to implement. Are there any issues, technical or legal, that would prevent me from including a new font and installing this font on devices when they install my app?

Thanks again for any input or advice,

TJ.

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

Re: icons for menu items?

Post by Klaus » Mon Mar 16, 2015 4:52 pm

Hi TJ;

sorry, but LC on mobile will only allow to display ONE stack at a time, so stack panels won't work there...


Best

Klaus

Post Reply