TImagelist Was:Re: RE: [lazarus] NEW WEB pages with the link

P Jean dit Bailleul jdb at abacom.com
Thu Aug 12 18:17:20 EDT 1999


At 22:34 12/08/99 +0200, you wrote:
>At 16:40 11-08-99 -0500, "Shane Miller" <SMiller1 at stvgb.org> wrote:
>>Marc, it's up to you which one you want.  I would think TSCrollbar would
>be easier but TImageList seems pretty straight forward.
>>
>>I think someone else said they were interested in TSCrollBar.  If you want
> to do TImageList, look at CONTROLS.PP.  It has a timagelist,
>tdragimagelist and tcustomimagelist.  They don't have anything in them,
>plus you need to move tcustomimagelist out of controls.pp. 
>>
>>All you have to do is make it compatable with Delphi....simple!  :-)
>>Take a look at what Delhpi has and what we need, then let me know.
>
>The delphi imagelist is merely based upon the Windows native imagelist. It
>sends just a lot of messages. So I could implement an imagelist based on
>this, but then I have to implement an imagelist for every library which
>does not support an imagelist (as far as I can see GTK has no imagelist)
>
>I could also implement an imagelist myself based upon a TList end bitmaps
>then the imagelist is platform independent, but how to interface with other
>components
>
>any ideas

Just a suggestion :
use a big Bitmap (of size n * Width x Height) to put every bitmaps, then
add a GetItem(index:Integer; aBitmap:TBitmap) method that set the size a
Bitmap and copy the corresponding area (from (index - 1) * Width x 0 to
index * Width x Height). I think that's the way it is implemented in the
Win DLL.
When a component have to refer to the TImageList, it just call the GetItem
method during the onshow.

I know that to do so i have to finish the TBitmap, but a can't make that
GDK stuff to work :-(
P Jean dit Bailleul (jdb at abacom.com)






More information about the Lazarus mailing list