这个事件只有在listview的ownerdata设置为true时才有用的。
它的其中一个作用就是用键盘快速定位item,比如有个item的caption为
'Good',则你按g键,这个item就会被选中。

解决方案 »

  1.   

    var
      I: Integer;
      Found: Boolean;
    begin
      I := StartIndex;
      if (Find = ifExactString) or (Find = ifPartialString) then
      begin
        repeat
          if (I = FIDList.Count-1) then
            if Wrap then I := 0 else Exit;
          Found := Pos(UpperCase(FindString), UpperCase(ShellItem(I)^.DisplayName)) = 1;//是不是这里,要先判断findstring不等于空格转化的string;
          Inc(I);
        until Found or (I = StartIndex);
        if Found then Index := I-1;
      end;
      

  2.   

    在borland的官方论坛已经给出了修正了。可以这样改:begin
      I := StartIndex;
      if (Find = ifExactString) or (Find = ifPartialString) then
      begin
         repeat
    //      if (I = FIDList.Count-1) then  // Remove this line      if I >= FIDList.Count then        if Wrap then I := 0 else Exit;
          Found := Pos(UpperCase(FindString), UpperCase(ShellItem(I)^.DisplayName)) = 1;
          Inc(I);
        until Found or (I = StartIndex);
        if Found then Index := I-1;
      end;
    end;