Hello everybody,

I have a control derived from TListBox with few items (lines) containing 
long string.
I want to make it to display the item under cursor in the tool-tip 
(hint) when the user moves the mouse over that item.


I did it, but the tool-tip is not updated when the cursor is moved over 
a different item. I need to call the 'Application.CancelHint' but of 
course, it is not available because this is a VCL not an application. Do 
you know a work around?
Thanks



MY CODE:


procedure TVListBox.MouseMove(Shift: TShiftState; X, Y: Integer);
VAR UnderCursor: string;
    itm: integer;
begin
 inherited;
 ...
  begin
    itm:= ItemAtPos(Point(X,Y), TRUE);
    ...                                                        
    UnderCursor:= Items[itm];                                         
    if Hint<> UnderCursor then
     begin
      Hint:= UnderCursor;
      Application.CancelHint;                 <------      PROBLEM HERE
     end;
  end;
end;
_______________________________________________
Delphi mailing list -> [email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to