diff --git a/lcl/imglist.pp b/lcl/imglist.pp index 10abc11353..5e61c2c0d6 100644 --- a/lcl/imglist.pp +++ b/lcl/imglist.pp @@ -291,6 +291,7 @@ type procedure SetMasked(const AValue: boolean); procedure SetShareImages(const AValue: Boolean); procedure SetWidth(const Value: Integer); + function GetHandle: TLCLHandle; function GetReference(AImageWidth: Integer): TWSCustomImageListReference; function GetReferenceForPPI(AImageWidth, APPI: Integer): TWSCustomImageListReference; function GetResolutionForPPI(AImageWidth, APPI: Integer; @@ -401,6 +402,7 @@ type property BkColor: TColor read FBkColor write SetBkColor default clNone; property Count: Integer read GetCount; property DrawingStyle: TDrawingStyle read FDrawingStyle write SetDrawingStyle default dsNormal; + property Handle: TLCLHandle read GetHandle; property Height: Integer read FHeight write SetHeight default 16; property HeightForPPI[AImageWidth, APPI: Integer]: Integer read GetHeightForPPI; property HeightForWidth[AWidth: Integer]: Integer read GetHeightForWidth; diff --git a/lcl/include/imglist.inc b/lcl/include/imglist.inc index abfce5fbad..f2b7cdcfec 100644 --- a/lcl/include/imglist.inc +++ b/lcl/include/imglist.inc @@ -2174,6 +2174,11 @@ begin for nIndex := 0 to Count - 1 do TChangeLink(Items[nIndex]).Change end; +function TCustomImageList.GetHandle: TLCLHandle; +begin + Result := ResolutionByIndex[0].Reference.Handle; +end; + {------------------------------------------------------------------------------ Method: TCustomImageList.WriteDefData Params: AStream: The stream to write the data to