From 2a64470b7951e63b2d79e0a720d508b18f382699 Mon Sep 17 00:00:00 2001 From: dmitry Date: Mon, 12 Aug 2019 14:50:25 +0000 Subject: [PATCH] cocoa: notifying the tablelist about number of items changing. #35957 git-svn-id: trunk@61687 - --- lcl/interfaces/cocoa/cocoawscomctrls.pas | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lcl/interfaces/cocoa/cocoawscomctrls.pas b/lcl/interfaces/cocoa/cocoawscomctrls.pas index fdfd5c7652..849abb61eb 100644 --- a/lcl/interfaces/cocoa/cocoawscomctrls.pas +++ b/lcl/interfaces/cocoa/cocoawscomctrls.pas @@ -191,8 +191,8 @@ type //carbon//class procedure SetHotTrackStyles(const ALV: TCustomListView; const AValue: TListHotTrackStyles); override; //carbon//class procedure SetHoverTime(const ALV: TCustomListView; const AValue: Integer); override; class procedure SetImageList(const ALV: TCustomListView; const {%H-}AList: TListViewImageList; const {%H-}AValue: TCustomImageListResolution); override; - (*class procedure SetItemsCount(const ALV: TCustomListView; const Avalue: Integer); override; - class procedure SetOwnerData(const ALV: TCustomListView; const {%H-}AValue: Boolean); override;*) + class procedure SetItemsCount(const ALV: TCustomListView; const Avalue: Integer); override; + (*class procedure SetOwnerData(const ALV: TCustomListView; const {%H-}AValue: Boolean); override;*) class procedure SetProperty(const ALV: TCustomListView; const AProp: TListViewProperty; const AIsSet: Boolean); override; class procedure SetProperties(const ALV: TCustomListView; const AProps: TListViewProperties); override; class procedure SetScrollBars(const ALV: TCustomListView; const AValue: TScrollStyle); override; @@ -1432,6 +1432,16 @@ begin lTableLV.lclSetImagesInCell(Assigned(AValue)); end; +class procedure TCocoaWSCustomListView.SetItemsCount( + const ALV: TCustomListView; const Avalue: Integer); +var + lCocoaLV: TCocoaListView; + lTableLV: TCocoaTableListView; +begin + if not CheckParams(lCocoaLV, lTableLV, ALV) then Exit; + lTableLV.noteNumberOfRowsChanged(); +end; + class procedure TCocoaWSCustomListView.SetProperty(const ALV: TCustomListView; const AProp: TListViewProperty; const AIsSet: Boolean); var