Page 1 of 1

icons for menu items?

Posted: Sat Mar 14, 2015 12:50 am
by tjo7777
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.

Re: icons for menu items?

Posted: Sat Mar 14, 2015 1:09 am
by Simon
Hi TJ,
For mobile I say roll your own.
Here is an example;
http://forums.livecode.com/phpBB2/viewt ... 212#p86465


Simon

Re: icons for menu items?

Posted: Sat Mar 14, 2015 1:45 am
by tjo7777
Thanks Simon,

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

TJ.

Re: icons for menu items?

Posted: Sat Mar 14, 2015 3:45 pm
by zaxos
You could use a stack as a menu dropDown wich gives you the freedom of adding anything in it.

Re: icons for menu items?

Posted: Sat Mar 14, 2015 4:14 pm
by jacque
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.

Re: icons for menu items?

Posted: Sat Mar 14, 2015 7:55 pm
by jiml
Perhaps use font characters?


Re: icons for menu items?

Posted: Sat Mar 14, 2015 7:57 pm
by jiml
Like:
Stop
Caution
Go

Re: icons for menu items?

Posted: Sat Mar 14, 2015 8:51 pm
by jacque
What a good idea. What font is that?

Re: icons for menu items?

Posted: Sun Mar 15, 2015 1:45 am
by jiml
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

Re: icons for menu items?

Posted: Sun Mar 15, 2015 3:56 am
by jacque
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.

Re: icons for menu items?

Posted: Mon Mar 16, 2015 4:37 pm
by tjo7777
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.

Re: icons for menu items?

Posted: Mon Mar 16, 2015 4:52 pm
by Klaus
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