brainware
asked on
TListView Problem..
Problem is that it pushed url to 2th line whatever i try..
Procedure TMainForm.DisplayFileList;
Var NewItem : TListItems; I : LongInt;
Begin
NewItem := FilesLV.Items;
FilesLV.Columns.Add.Captio n := 'FileName';
FilesLV.Columns.Add.Captio n := 'URL';
FilesLV.Columns.Add.Captio n := 'Desc';
FilesLV.Columns.Add.Captio n := 'Size Kb';
for I := 0 to TItems_Count-1 do
Begin
NewItem.Add.Caption := TItems[I].FileName;
// Need to add TItems[i].URL;
// Need to add TItems[i].Desc;
End;End;
Procedure TMainForm.DisplayFileList;
Var NewItem : TListItems; I : LongInt;
Begin
NewItem := FilesLV.Items;
FilesLV.Columns.Add.Captio
FilesLV.Columns.Add.Captio
FilesLV.Columns.Add.Captio
FilesLV.Columns.Add.Captio
for I := 0 to TItems_Count-1 do
Begin
NewItem.Add.Caption := TItems[I].FileName;
// Need to add TItems[i].URL;
// Need to add TItems[i].Desc;
End;End;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Ok brainware,
just give me sometime. I´m a little busy right now...
just give me sometime. I´m a little busy right now...
Hi brainware,
as promised, this is an example:
procedure TForm1.Button1Click(Sender : TObject);
var
NewItem: TListItem;
begin
NewItem := ListView1.Items.Add;
NewItem.Caption := 'your file name';
NewItem.SubItems.Add('your url');
NewItem.SubItems.Add('your description');
NewItem.SubItems.Add('your file size');
end;
Don´t forget to set the columns in the Object inspector (Columns property).
It´s not necessary to do it in the code.
Any doubts place a question with the subject "To: Itamar"
IHTH
as promised, this is an example:
procedure TForm1.Button1Click(Sender
var
NewItem: TListItem;
begin
NewItem := ListView1.Items.Add;
NewItem.Caption := 'your file name';
NewItem.SubItems.Add('your
NewItem.SubItems.Add('your
NewItem.SubItems.Add('your
end;
Don´t forget to set the columns in the Object inspector (Columns property).
It´s not necessary to do it in the code.
Any doubts place a question with the subject "To: Itamar"
IHTH
ASKER