mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 19:29:34 +02:00
Win32: started TListView.Exchange() TListView.Move() for win32 ws.Added todo.
git-svn-id: trunk@31360 -
This commit is contained in:
parent
edac0eec23
commit
48712541fc
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user