Handling image list

M

martin.zugec

Hi guys,

how are you handling images in your applications?? Sometimes
components wants images from Resources, sometimes imagelist...

Also for image list you must specify image size, but I would like to
use sometimes 16x16, sometimes 32x32 and use one source for all
images... :(

Waiting for any suggestions\best practises :(
 
H

Herfried K. Wagner [MVP]

how are you handling images in your applications?? Sometimes
components wants images from Resources, sometimes imagelist...

Also for image list you must specify image size, but I would like to
use sometimes 16x16, sometimes 32x32 and use one source for all
images... :(

Simply use more than one imagelist (one for each control/group of images
shared between more than one control, one for each image size). This is
much easier to maintain than an image list containing a large number of
images.
 
M

martin.zugec

I was afraid this will be answer, anyway thanks :(


However it is obviously only solution to use... I was rather
interested in handling Resources, because right now (without code) you
cant simply use some virtual ImageList to store images from
Resources...

Or am I wrong?
 
M

martin.zugec

I was afraid this will be answer, anyway thanks :(

However it is obviously only solution to use... I was rather
interested in handling Resources, because right now (without code) you
cant simply use some virtual ImageList to store images from
Resources...

Or am I wrong?

One more question related to this... I just implemented two separate
imagelists (small & big) and assigned them to my ListView...

There is same Key in both of them ("Server"), so whatever you select,
you should automatically receive either big or small icon...

But it is not working??? Only the first view mode is working fine,
another one not.

For example - by default I have Details view. That means that all
modes that are using same ImageList also works fine.

If I would select LargeIcon as default (in designer), then LargeIcon
and Tiles would work fine...

The other have random picture assigned :(

Any ideas???
 
M

martin.zugec

Well, still got problems :(

Because I am using multiple forms, I dont want to create multiple
ImageList objects for every single one...

So I tried to create one ImageList on my main form, then create empty
image list on custom form and make it copy...

To show what I mean:

CustomForm.SmallImageList = Main.SmallImageList
CustomForm.BigImageList = Main.BigImageList

But it is not working :( Obviously keys are present, however images
are not assigned to my ListView :(

Any ideas what I am doing wrong??

Thanks,
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top