thanks Ben. I will give that a go.
Jeremy
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Ben Taylor
Sent: Friday, 4 May 2001 10:54
To: Multiple recipients of list delphi
Subject: re: [DUG]: Overrriding Items in List View
hope this helps!
illustration of what you can do:
TMyListItem = class(TListItem)
private
FmyString: string;
procedure SetmyString(const Value: string);
published
property myString:string read FmyString write SetmyString;
end;
TMyListView = class(TCustomListView)
protected
function CreateListItem: TListItem; override;
end;
-------------------
function TMyListView.CreateListItem: TListItem;
begin
Result:=TMyListItem.Create(Items);
end;
procedure TMyListItem.SetmyString(const Value: string);
begin
FmyString := Value;
Caption:='value:'+myString;
end;
--------------------
procedure TForm1.FormCreate(Sender: TObject);
begin
Flist:=TMyListView.Create(Self);
flist.Parent:=Self;
flist.align:=alclient;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
aItem:TmyListItem;
begin
aItem:=Flist.Items.Add as TmyListItem;
aItem.myString:='boo';
end;
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"