Recent

Author Topic: BitMap from TImageList to TPicture  (Read 1997 times)

CCP1CON

  • New Member
  • *
  • Posts: 14
BitMap from TImageList to TPicture
« on: October 05, 2013, 08:00:40 pm »
Hi all,

I fail to change the TImage.Picture with a picture loaded from a TImageList. This is what I’ve tried so far:

Code: [Select]
ImageList1.GetBitmap (1, (Sender As TImage).Picture);
But the compiler doesn’t like it ... So I guess there must be another way.

Thanks for your help.

wp

  • Hero Member
  • *****
  • Posts: 7353
Re: BitMap from TImageList to TPicture
« Reply #1 on: October 05, 2013, 08:28:20 pm »
Code: [Select]
ImageList1.GetBitmap (1, (Sender As TImage).Picture.Bitmap);
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

CCP1CON

  • New Member
  • *
  • Posts: 14
Re: BitMap from TImageList to TPicture
« Reply #2 on: October 05, 2013, 08:33:35 pm »
Is it that simple?  %) I'll try.

CCP1CON

  • New Member
  • *
  • Posts: 14
Re: BitMap from TImageList to TPicture
« Reply #3 on: October 05, 2013, 08:37:51 pm »
It is ... thanks and sorry WP.

 

TinyPortal © 2005-2018