我已经解决了~事先要把ShowHint赋值为真!
在ListBox1Click事件中写代码!如下:procedure TForm1.ListBox1Click(Sender: TObject);
var
  i: Integer;//i变量用来控制循环的
begin
  for i:=0 to ListBox1.Items.Count-1 do //这里因为Listbox的index值从0开始,然后读取listbox总有多少条记录,因为索引从0开始,所以循环要减一
  begin
    if ListBox1.ItemIndex = i then
    begin
      ListBox1.Hint := ListBox1.Items[i];
    end;
  end;
end;

解决方案 »

  1.   

    type
      TForm1 = class(TForm)
        ListBox1: TListBox;
        procedure ListBox1MouseMove(Sender: TObject; Shift: TShiftState; X,
          Y: Integer);
        procedure ListBox1Click(Sender: TObject);
      private
        { Private declarations }
        i:integer;
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.DFM}procedure TForm1.ListBox1MouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
    begin
    ListBox1.hint:=ListBox1.Items[i];end;procedure TForm1.ListBox1Click(Sender: TObject);
    begin
      i:= ListBox1.ItemIndex;
    end;
      

  2.   

    俺认为应该是这样:
    procedure TForm1.ListBox1MouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
    var
      sPoint : TPoint;
      sIndex : Integer;
    begin
      sPoint.x := X;
      sPoint.y := Y;
      sIndex := TListBox(Sender).ItemAtPos(sPoint,True);
      if sIndex <> -1 then
      begin
        TListBox(Sender).Hint := TListBox(Sender).Items.Strings[sIndex];
        GetCursorPos(sPoint);
        Application.ActivateHint(sPoint);
      end;
    end;
      

  3.   

    同意  ScoutKing(失眠夜) 的。
      

  4.   

    确实可行,Application.ActivateHint很关键.大家想想能让HINT与当前列显示在同一行中吗?可能要用到THintWindow.
      

  5.   

    可加条件判断列宽是否大于LISTBOX宽度以只显示超出范围的项目.
    if (sIndex<>-1) and (listbox1.Canvas.TextWidth(listbox1.Items.Strings[sIndex])>listbox1.Width) then
       begin
        listbox1.Hint:=listbox1.Items.Strings[sIndex];
        GetCursorPos(sPoint);
        listbox1.ShowHint:=true;
        Application.ActivateHint(sPoint);
       end
     else
        listbox1.ShowHint:=false;
      

  6.   

    他说的意思是像window的资源管理器一样的~!
      

  7.   

    你的题目是要实现鼠标移动时显示当前列的全部内容,但是前面的几个大侠所编都是listbox1.click,并不是鼠标移动时显示当前列的全部内容,你的问题是不是怎样的。如果是就没有意思了,是不是?