Forum > General

displaying long TListbox items as hints

(1/1)

j0x:
i have this code


--- Code: ---procedure TfrmMain.lstVideoMouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
var
   lstIndex: integer;
begin
   lstIndex:= lstVideo.GetIndexAtXY(X,Y);
   if (lstIndex >=0) and (lstIndex <= lstVideo.Items.Count) then begin
       lstVideo.Hint:= lstVideo.Items[lstIndex];
   end else begin
       lstVideo.Hint:='';
   end;
end;            

--- End code ---

and every time i move the mouse on the next item on the TListbox (lstVideo) it does not show the hint intended for it, what it shows is the previous lstVideo item hint, the tooltip's hint is stuck at that previous item, so how can i fix this

thanks for any responses

EDIT:

and im getting this warning each time i compile

--- Code: ---umain.pas(40,49) Hint: Parameter "Shift" not used
--- End code ---
i dont even know what is the use of shift or how to implement it on the code above so any help on this too will be great

Navigation

[0] Message Index

Go to full version