Вниз
Скачать: 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.008 c
1-75610
Анатолий
2002-01-07 05:58
2002.01.24
Форма


3-75530
Аркадий
2001-12-21 17:42
2002.01.24
Delphi - BDE - MS SQL login failed


6-75639
krimer
2001-11-02 16:35
2002.01.24
console server


1-75598
Masa
2002-01-06 23:09
2002.01.24
Помогите написать алгоритм вычисления простых чисел из множества !!!


7-75707
Desdechado
2001-10-10 18:16
2002.01.24
класс TPrinter




   Наверх