Вниз
Скачать: CL | DM;

Ну неужели никто не знает как брать данные из ListView и класть их куда надо.   Найти похожие ветки 

 
Dmitriy_R   (2002-01-07 17:39) [0]

Ну хоть кто нить подскажет где грабли на которые я наступаю.
function TFormList.SaveList(FileName: AnsiString):integer;
Var SubItems: TStrings;
I: integer;
begin
Memo.Lines.Clear();
For I := 0 to ListView.Items.Count do
begin
SubItems := ListView.Items.Item[I].SubItems;
Memo.Lines.Add(SubItems.Strings[1]);
Memo.Lines.Add(SubItems.Strings[2]);
Memo.Lines.Add(SubItems.Strings[3]);
end;
Далее идет сохранение файла...
end;


 
XeN ©   (2002-01-07 19:06) [1]

var i:integer;
......
if listview.Items.Count < 0 then exit;
Memo.Lines.Clear();
For i := 0 to listview.Items.Count - 1 do
Begin
Memo.Lines.add(listview.Items.Item[i].Caption);
Memo.Lines.add(listview.Items.Item[i].SubItems.strings[0]);
Memo.Lines.add(listview.Items.Item[i].SubItems.strings[1]);
Memo.Lines.add(listview.Items.Item[i].SubItems.strings[2]);
end;
......

А можно и без memo, так сделать...


Procedure SaveALL(filename:string);
var
i:integer;
ts:tstringlist;
begin
if listview.Items.Count < 0 then exit;
try
ts := tstringlist.create;
For i := 0 to listview.Items.Count - 1 do
Begin
ts.add(listview.Items.Item[i].Caption);
ts.add(listview.Items.Item[i].SubItems.strings[0]);
ts.add(listview.Items.Item[i].SubItems.strings[1]);
ts.add(listview.Items.Item[i].SubItems.strings[2]);
end;
ts.savetofile(filename);
ts.free;
except halt; end;





Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: -0.993 c
1-75578
msys
2001-12-21 13:30
2002.01.24
IMAGE


4-75715
Delphi5.01
2001-11-15 17:36
2002.01.24
Очистка папки.


4-75721
lionheart
2001-11-23 11:15
2002.01.24
SetWindowsHookEx


3-75468
dim-
2001-12-18 09:15
2002.01.24
Список индексов


1-75623
Belov
2002-01-08 15:43
2002.01.24
Изменение размеров картинки




   Наверх