procedure TForm1.ListView1Click(Sender: TObject); var Row, Col: Integer; begin Row := 2; Col := 3; showmessage(ListView1.Items[Row - 1].SubItems[Col - 2]); end;
procedure TForm1.ListView1Click(Sender: TObject); var Row, Col: Integer; begin Row := 2; Col := 3; ShowMessage(ListView1.Items[Row - 1].Caption); //第Row行,第1列 showmessage(ListView1.Items[Row - 1].SubItems[Col - 2]);//第Row行, 第Col列 Col>1 end;
for i := 0 to ListView.Items.Count - 1 do begin if (ListView.Items.Item[i].Caption = '***') then showmessage(ListView.Items.Item[i].SubItems[0] + ListView.Items.Item[i].SubItems[1] ); end
listviw.items[RowNo - 1].Caption
else
listviw.items[RowNo - 1].substrings[ColNo - 2]返回的都是string
var
Row, Col: Integer;
begin
Row := 2;
Col := 3;
showmessage(ListView1.Items[Row - 1].SubItems[Col - 2]);
end;
var
Row, Col: Integer;
begin
Row := 2;
Col := 3;
ShowMessage(ListView1.Items[Row - 1].Caption); //第Row行,第1列
showmessage(ListView1.Items[Row - 1].SubItems[Col - 2]);//第Row行, 第Col列 Col>1
end;
begin
if (ListView.Items.Item[i].Caption = '***') then
showmessage(ListView.Items.Item[i].SubItems[0] +
ListView.Items.Item[i].SubItems[1] );
end