[lazarus] CVS Committed

Marc Weustink marc at dommelstein.net
Sun Jan 14 10:10:39 EST 2001

At 14:59 12-01-01 -0700, Robert Scott Horning wrote:
>Marc Weustink wrote:
> > At 15:15 11-01-01 -0600, Shane Miller wrote:
> > >I changed TImageList to keep images in a TList so that I could get it
> > >working for now.  I'm not sure what disadvantages there are using it this
> > >way.  It sure seems simpler....
> >
> > Disadvantage is that it costs a lot of resource handles (every image one).
> > In the original implementation you had only one image handle
> >
> > Did you ceep in mind that you can add larger bitmaps which result in
> > separate images ?
> >
> > Marc
>One reason I would personally prefer an implementation like this is to allow
>adding images of different sizes simultaneously.  By throwing all of the
>images onto a common bitmap (how Delphi does this), you have all kinds of
>problems trying to resize the base bitmap or cropping when images don't
>exactly fit the dimensions you have chosen for the image list.

This way you loose compatibility with delphi. Now you have made your own 
imagelist (in fact a TList with images) The more I think about it the less 
advantages I see in the new solution. When I implemented the original 
implementation I also tought about storing separate images, but if you want 
to be compatible you have to implement all methods and props and behaviour 
of the standard imagelist. In that light I didn't see  an advantage of 
storing  images separate. (The amount of code will be the same ifnot more)

>One other problem that I have in general with the Delphi implementation is
>that on some occasions the bitmap gets corrupted, requiring me to have to 
>load in all of the bitmaps all over again one at a time... and remembering 
>what their item indexes were so I don't mess up any controls relying on 
>the image list, but that is beyond the scope of this thread.

I never had that problem (not in a normal situation, where your app behaves 


More information about the Lazarus mailing list