LCL: TCustomListView: added TCustomListView.AddItem for delphi compatibility. issue #25092

git-svn-id: trunk@43245 -
This commit is contained in:
zeljko 2013-10-14 07:39:44 +00:00
parent f6fa81d118
commit 32a2a8e653
2 changed files with 10 additions and 0 deletions

View File

@ -1514,6 +1514,7 @@ type
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure AddItem(Item: string; AObject: TObject);
function AlphaSort: Boolean; // always sorts column 0 in sdAscending order
procedure BeginUpdate;
procedure Clear;

View File

@ -984,6 +984,15 @@ begin
FreeAndNil(FIconOptions);
end;
procedure TCustomListView.AddItem(Item: string; AObject: TObject);
var
AItem: TListItem;
begin
AItem := Items.Add;
AItem.Caption := Item;
AItem.Data := AObject;
end;
function TCustomListView.AlphaSort: Boolean;
begin
Result := False;