diff --git a/lcl/interfaces/win32/win32wscomctrls.pp b/lcl/interfaces/win32/win32wscomctrls.pp index 1161d2c496..47782e1fdd 100644 --- a/lcl/interfaces/win32/win32wscomctrls.pp +++ b/lcl/interfaces/win32/win32wscomctrls.pp @@ -101,6 +101,8 @@ type // items class procedure ItemDelete(const ALV: TCustomListView; const AIndex: Integer); override; class function ItemDisplayRect(const ALV: TCustomListView; const AIndex, ASubItem: Integer; ACode: TDisplayCode): TRect; override; + class procedure ItemExchange(const ALV: TCustomListView; AItem: TListItem; const AIndex1, AIndex2: Integer); override; + class procedure ItemMove(const ALV: TCustomListView; AItem: TListItem; const AFromIndex, AToIndex: Integer); override; class function ItemGetChecked(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem): Boolean; override; class function ItemGetPosition(const ALV: TCustomListView; const AIndex: Integer): TPoint; override; class function ItemGetState(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const AState: TListItemState; out AIsSet: Boolean): Boolean; override; // returns True if supported diff --git a/lcl/interfaces/win32/win32wscustomlistview.inc b/lcl/interfaces/win32/win32wscustomlistview.inc index 45b9e2a15b..af194d8a49 100644 --- a/lcl/interfaces/win32/win32wscustomlistview.inc +++ b/lcl/interfaces/win32/win32wscustomlistview.inc @@ -529,6 +529,26 @@ begin SendMessage(ALV.Handle, mes, AIndex, lparam(@Result)); end; +class procedure TWin32WSCustomListView.ItemExchange(const ALV: TCustomListView; + AItem: TListItem; const AIndex1, AIndex2: Integer); +begin + if not WSCheckHandleAllocated(ALV, 'ItemExchange') then + exit; + //TODO: there's no way to exchange items with Windows listview macros + //so we have to reassign TLvItem to AIndex1 and AIndex2 + //or use RecreateWnd() which is very expensive +end; + +class procedure TWin32WSCustomListView.ItemMove(const ALV: TCustomListView; + AItem: TListItem; const AFromIndex, AToIndex: Integer); +begin + if not WSCheckHandleAllocated(ALV, 'ItemMove') then + exit; + //TODO: there's no way to exchange items with Windows listview macros + //so we have to reassign TLvItem to AIndex1 and AIndex2 + //or use RecreateWnd() which is very expensive +end; + class function TWin32WSCustomListView.ItemGetChecked(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem): Boolean; begin Result := False;