procedure TForm1.ListView1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); VAR TMP:tlISTITEM; begin TMP:=listview1.GetItemAt(x,y); IF TMP<>NIL THEN LISTVIEW1.Hint:=TMP.Caption ; end;
改进一下outer2000(天外流星)的方法应该可以,是否可以把x,y设成某个范围呢!
请用这个: application.ActiveHint(TPoint);
这涉及到Application.Hint信息的设置以及mouseMove事件的配合使用处理方法如下:1,在工程文件中加: Application.HintPause:=0; Application.HintHidePause:=100000; 2, procedure TForm1.ListView1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); VAR TMP:TListitem; begin TMP:=listview1.GetItemAt(x,y); if TMP<>nil then begin listview1.Hint:=TMP.Caption ; if Label15.Caption<>TMP.Caption then begin Application.CancelHint; Label15.Caption:=TMP.Caption ; end; end; end;
就没显示了...
procedure TForm1.ListView1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
VAR
TMP:tlISTITEM;
begin
TMP:=listview1.GetItemAt(x,y);
IF TMP<>NIL THEN
LISTVIEW1.Hint:=TMP.Caption ;
end;
application.ActiveHint(TPoint);
Application.HintHidePause:=100000;
2,
procedure TForm1.ListView1MouseMove(Sender: TObject; Shift: TShiftState;
X, Y: Integer);
VAR
TMP:TListitem;
begin
TMP:=listview1.GetItemAt(x,y);
if TMP<>nil then
begin
listview1.Hint:=TMP.Caption ;
if Label15.Caption<>TMP.Caption then
begin
Application.CancelHint;
Label15.Caption:=TMP.Caption ;
end;
end;
end;