Recent

Author Topic: TImageList.Handle, in version 2.0.0  (Read 789 times)

JosepB

  • Newbie
  • Posts: 2
TImageList.Handle, in version 2.0.0
« on: February 07, 2019, 12:59:16 pm »
In version 2.0.0 of Lazarus the TImageList component does not have the Handle property that allowed, in version 1.8.4, using the Windows API. How can it be done now? Thank you.

Ondrej Pokorny

  • Full Member
  • ***
  • Posts: 210
Re: TImageList.Handle, in version 2.0.0
« Reply #1 on: February 07, 2019, 05:58:13 pm »
Try ImageList1.ResolutionByIndex[0].Reference.Handle

JosepB

  • Newbie
  • Posts: 2
Re: TImageList.Handle, in version 2.0.0
« Reply #2 on: February 07, 2019, 06:55:10 pm »
It works perfectly. Thank you!.

Bart

  • Hero Member
  • *****
  • Posts: 3315
    • Bart en Mariska's Webstek
Re: TImageList.Handle, in version 2.0.0
« Reply #3 on: February 07, 2019, 07:25:38 pm »
Document this in release notes?

Bart

Ondrej Pokorny

  • Full Member
  • ***
  • Posts: 210
Re: TImageList.Handle, in version 2.0.0
« Reply #4 on: February 07, 2019, 09:14:27 pm »
Document this in release notes?

Yes and/or implement read-only Handle/HandleAllocated properties in image list to get the old behavior back. Since 1.9 TCustomImageList is not a descendant of TLCLReferenceComponent anymore, therefore they got lost and I forgot to add them.