Icon Image Library

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

anmldr
Posts: 459
Joined: Tue Sep 11, 2012 11:13 pm

Icon Image Library

Post by anmldr » Fri Jan 30, 2015 6:41 pm

How do I add an icon to the LiveCode image library so that I don't have to import it every time that I want to include it in my apps?

Linda

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

Re: Icon Image Library

Post by Mark » Sat Jan 31, 2015 9:46 am

Hi Linda,

Even if an icon is imported in a library, you need to add it to your apps. Although I think it should be possible to have icons from the image library added to an app automatically, I don't remember that this actually worked.

The easiest way probably is to have a stack with images that you use frequently and add this stack to new projects as a substack or as an additional stack file.

Kind 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

anmldr
Posts: 459
Joined: Tue Sep 11, 2012 11:13 pm

Re: Icon Image Library

Post by anmldr » Sat Jan 31, 2015 7:28 pm

I am not quite sure that you understand exactly what I am asking...almost though. It is my fault.

When you click on the property for say a button. Choose Colors & Patterns. Click on the left button for Fill (backgroundPattern), it shows the image library included in LC. There is a choice for Standard Icons, Default Patterns, Metacard....and the last is for This Stack. I understand how to add an image to my card and reference it or chose it from this library to have it added to the button. However, if you look closely at the image library, it has some LC icons in the Standard Icons. I would like to know if it is possible for me to add some of my icons to one of these collections so that they are always handy without having to add them every time to my app say as a substack or card with all of my images that I reference.

It is not a big deal. I am a newbie and I have ideas sometimes about what would make it more efficient for me. Is the image library a LC stack? If so, it may be able to be altered. If written in some other language, it would be more difficult.

We have been able to alter other stacks with the message box. I was hoping to be able to do this with the LC image library as well.

Linda

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Icon Image Library

Post by jacque » Sat Jan 31, 2015 9:36 pm

You can access the full image library interface by choosing "Image Library" from the Development menu. The library allows you quick access to your own images (which can be used as icons or anything else) as well as the standard sets that ship with LC. Click the "New Library" button to create a new library of your own.

To populate your library, import the images you want to use onto a card in a stack as you normally do. Select the images on the card, then in the Library, click "Import Selected". The images will be copied to and stored in your new library. You can also import an image file from disk using the Import File button instead.

Once your library is populated, it will appear in the popdown lists whenever you want to choose an icon image. Mark's point was that simply choosing an icon from the library will not save those images into your stack. They will not show up in standalones or if you send the stack to someone else. Only imported images travel with your stack, so the library is a handy place to store images you use often, but you will need to import them into the stack as you always have if you want them to be permanent.

You can import an icon into your stack from the library. Select it in the library and choose "Place Image". The library image will be imported to the current top stack, just as though you'd imported it from the Import as Control menu item. I use a custom image library to store commonly used images such as a company logo and various navigation icons.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

SparkOut
Posts: 2839
Joined: Sun Sep 23, 2007 4:58 pm

Re: Icon Image Library

Post by SparkOut » Sat Jan 31, 2015 10:13 pm

I think what the OP means is more along the lines of :

In View menu, select LiveCode UI elements in lists
In Application Browser find the stack revGeneralIcons
Import an image to the first card of that stack and save it
Browse to the image libraray and see the imported image available along with the built-in choices.

Probably?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Icon Image Library

Post by jacque » Sat Jan 31, 2015 10:31 pm

Yeah, that would work too. The problem with that approach is that each new LC version will ship with its own library, so if you change the one in the IDE, the changes will be lost.

Another quick way to make a custom image library is to import a bunch of images into a stack and store the stack in the My LiveCode folder at My LiveCode/Resources/Icon Libraries /. Then restart LC and the stack should appear in the Image Library popup. I think the stack name has to begin with "revlib" to load properly.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

anmldr
Posts: 459
Joined: Tue Sep 11, 2012 11:13 pm

Re: Icon Image Library

Post by anmldr » Tue Feb 17, 2015 4:24 pm

All great suggestions. I am sorry that I did not see your responses sooner in order to thank you.

Linda

jim1001
Posts: 143
Joined: Fri Jan 29, 2016 6:25 pm

Re: Icon Image Library

Post by jim1001 » Wed Mar 01, 2017 3:53 pm

Jacque / Anyone,
choosing "Image Library" from the Development menu
I'm using LC Community 8.1.3 & I don't see "Image Library" on the Development menu. Maybe it's changed? I do see an Image Chooser popup when choosing an icon for a button - is this the same thing?

Thanks.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Icon Image Library

Post by jacque » Wed Mar 01, 2017 5:25 pm

The Image Library was removed a few versions back. I miss it.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Icon Image Library

Post by richmond62 » Wed Mar 01, 2017 9:34 pm

jacque wrote:The Image Library was removed a few versions back. I miss it.
There are quite a few things that have been removed which I miss.

HOWEVER . . .

When I want to use an image of mine as a button icon in a stack/standalone I tend to import it into the
last card of my stack (which I normally call my "resource card").

The all I have to do if I want it as an icon for a button anywhere in that stack is just enter its
ID number in the little boxes for icons in the properties palette for that button.
Screen Shot 2017-03-01 at 10.30.53 pm.png

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Icon Image Library

Post by jacque » Thu Mar 02, 2017 6:22 am

I do something similar, but I often put my images into a group that is not placed on any card. That way it is always available but I don't have an extra card in the stack to work around. If I want to change or add to the images, I temporarily place the group, tinker with it, then remove it again. It's a little more work than just going to another card but it keeps things out of the way.

I also have a stack that contains some commonly-used images (logos, icons, etc.) that I can open and copy from. I used to use the image library for that, but my own stack can store custom controls too so that's helpful.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jim1001
Posts: 143
Joined: Fri Jan 29, 2016 6:25 pm

Re: Icon Image Library

Post by jim1001 » Thu Mar 02, 2017 5:17 pm

jacque, richmond62

Thanks for your suggestions. I've a related question. I have an entry Icons that appears as an Image library in my Image Chooser - see attachment. These appear to be icons which I've used in a previous app but I can't recall how I got them in there or how they're being included - maybe they are there for everyone? The Icons library appears in new apps I create.

Can anyone help me solve the mystery?

Thanks!
Attachments
screenshot.3.jpg

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Icon Image Library

Post by jacque » Fri Mar 03, 2017 9:29 pm

You apparently created a custom icon library at some point and installed it in your "My LiveCode" folder. These are basically just regular stacks with imported images. If the stack is named "rev"-something and placed in the folder "My LiveCode/Resources/Icon Libraries/", the icon chooser will pick i t up and include it. Your stack is probably named "revIcons". The location of that folder should be displayed in LC preferences, Files & Memory pane, at the bottom in "User Extensions".

The Image Library used to include a handy way to manage those images. Now we need to open the stack manually to add images to it.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jim1001
Posts: 143
Joined: Fri Jan 29, 2016 6:25 pm

Re: Icon Image Library

Post by jim1001 » Sat Mar 04, 2017 1:08 am

You are right jacque - thanks! I do have a stack revLibIcons.rev in that folder. I had noticed it before asking the question although hadn't remembered the reason for putting it there as you've now explained. Now I need to figure out why I don't see anything when I try to open it - no trace of it anywhere. However when I try to open it again LiveCode tells me it's already open. Hmm...

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Icon Image Library

Post by jacque » Sat Mar 04, 2017 2:30 am

The IDE filters out stacks that begin with "rev". Try:

Code: Select all

set the vis of stack "revIcons" to true
toplevel "revIcons"
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”