我想实现鼠标移动到Listbox的每一项目时显示不一样的提示Hint:
Listbox1MouseMove()
   ItemPos:=Listbox1.ItemAtPos(Point(x,y),false);
   Listbox1.Hint:=Listbox1.Items[ItemPos];
显示第一个Hint之后,以后都要点击项目之后才能showhint?请问该怎么办?
我试过好多办法都不行,请各位大侠指教

解决方案 »

  1.   

    procedure TForm1.ListBox1MouseMove(Sender: TObject; Shift: TShiftState; X,Y: Integer);
    var
       A:Integer;
    begin
       A:=ListBox1.ItematPos(Point(X,y),True);
       IF A>=0 then
        Begin
          ListBox1.Hint:=ListBox1.Items[A];
          Application.ActivateHint(Point(X,Y));  //important
        End;
    end;
      

  2.   

    太谢谢applelyl(沧浪之水) ,请接分