[Gambas-user] Storing picture data in a collection

Benoit Minisini gambas at ...1...
Mon Feb 27 17:35:13 CET 2006


On Monday 27 February 2006 04:10, GuruLounge - MailLists wrote:
> I'm trying to reference images stored on a form so I can map those
> images elsewhere.
>
> I've an "iconform" with a number of pictureboxes representing icons I
> want to use in my project.
>
> When I do a directory list I want to map icons from that iconform to
> each item in the columnview directory depending on each directory
> entry's file type.
>
> I've been doing this using a collection with references to individual
> icons on disk, e.g.
>
> FileImages.Add["file-archive.png","archive"]
> then referencing it using
>
> picture[FileImages[filetype]]
>
> This works but I'd rather store the icons in the project and reference
> them without having to pack a bunch of icon files in the final
> distributable.  So I've used pictureboxes on a seperate hidden form but
> I've not figured how how to reference them - preferably with a hash or
> collection of sorts.
>
> Any ideas how I can do this?
>
> Thanx,
> Jeff

But why don't you put your icons directly in your project? Why putting them 
inside PictureBox, inside a form, just for using them elsewhere? It is a 
waste of time and memory!

-- 
Benoit Minisini





More information about the User mailing list