也就是将鼠标放到上面就成为类似超链接的样子,然后调出另一个指定的窗体或者文档。多谢大家多多帮忙!

解决方案 »

  1.   

    这个只用把TLabel显示在他们上面就可以了,没一个item都有一个data属性,将tabel的top和left等属性设置好后,附给item的data属性就可以了,注意label的parent要为指定的item
      

  2.   

    处理其MouseMove事件, Screen.Cursor := crHandPoint;然后处理其Click事件, 调用其它窗体或用ShellExecute调用其它文档不知可否满足要求?
      

  3.   

    hkbarton(宁静至远||淡泊明志) 能不能帮我举个例子,麻烦做个程序发给我好吗,谢谢!
    [email protected]
      

  4.   

    一个listview的例子
    var
     LabelRect:TRect;
     Label1:TLabel;
    begin
     LabelRect:=ListView1.Items.Item[0].DisplayRect(drBounds);
     Label1:=TLabel.Create(ListView1);
     with Label1 do
     begin
      parent:=ListView1;
      caption:='a link example';
      //onclick:=a procedure   这里是你的处理过程,如打开窗口等
      cursor:=crHandPoint;
      font.Color:=clRed;font.charset:=ANSI_CHARSET;font.Size:=10;font.Name:='宋体';
      top:=LabelRect.Top+1;
      left:=LabelRect.Left+ListView1.Columns[0].Width+10;
     end;
    end;
      

  5.   

    最后还少了一句,改正一下,另外你可以把上面的代码放在一个过程中,如一个按纽的点击事件中,具体的根据你需要了
    var
     LabelRect:TRect;
     Label1:TLabel;
    begin
     LabelRect:=ListView1.Items.Item[0].DisplayRect(drBounds);
     Label1:=TLabel.Create(ListView1);
     with Label1 do
     begin
      parent:=ListView1;
      caption:='a link example';
      //onclick:=a procedure
      cursor:=crHandPoint;
      font.Color:=clRed;font.charset:=ANSI_CHARSET;font.Size:=10;font.Name:='宋体';
      top:=LabelRect.Top+1;
      left:=LabelRect.Left+ListView1.Columns[0].Width+2;
     end;
     ListView1.Items.Item[0].Data:=Label1;
    end;
      

  6.   

    hkbarton(宁静至远||淡泊明志) 能不能帮我举个例子,麻烦用Delphi做个程序发给我好吗,你的源程序调不通,谢谢!
    [email protected]
      

  7.   

    错误如下:Project Project.exe raised exception class EAccessViolation with message 'Access violation at address 00432BCO in module 'Project1.exe'. Read of address 00000004'. Process stopped. Use Step or Run to continue.
      

  8.   

    hkbarton(宁静至远||淡泊明志) 就是用你写的代码出错的
      

  9.   

    jyl107(旋风小子) 不要着急,我用那个代码的确没有问题的,要不然我做个例子传给你吧,我这几天很忙,可能明天才有空,我明天传给你
      

  10.   

    已经发给你邮件了哈,程序在附件里,你说的那个av错误是我不小心没告诉你,你要试那个代码需要先在listview里加一个item,并且加两个colum