求救:listview1单击事件
    listview1我用的是vsList方式,想单击选中的行,然后获得改行的标题,试了单击事件都不行,请高手指点,谢谢:)

解决方案 »

  1.   

    不知道你是不是这个意思?
    procedure TForm1.ListView1Click(Sender: TObject);
    begin
      ListView1.Selected.Caption := 'ccccc';
    end;
      

  2.   

    showmessage(ListView1.Selected.Caption);
      

  3.   

    多谢各位,问题已解决,如下:
    procedure TForm1.ListView1Click(Sender: TObject);
    begin
      if listview1.selected<>nil then
        showmessage(ListView1.Selected.Caption);
    end;
      

  4.   

    和楼上的朋友一样。
    var str:String;procedure TForm1.ListView1Click(Sender: TObject);
    begin
      if listview1.selected<>nil then
       str:=ListView1.Selected.Caption;
    end;