Einzelnen Beitrag anzeigen

Keldorn

Registriert seit: 6. Mär 2003
Ort: Meißen
876 Beiträge
 
Delphi 10.1 Berlin Professional
 
#2

Re: OnMouseOver bei Listbox Items

  Alt 5. Feb 2004, 18:53
Hallo

ich verwende diesen Code für ein Stringrid, er würde jede Zelle als hint anzeigen
Delphi-Quellcode:
procedure TForm1.StringGrid1MouseMove(Sender: TObject; Shift: TShiftState;
  X, Y: Integer);
var
  MyRow, MyCol: Integer;
  oldhint:string;
begin
  oldhint:=StringGrid1.hint;
  StringGrid1.MouseToCell(x, y, MyCol, MyRow);
  if (MyRow<>-1) and (Mycol<>-1) then
    StringGrid1.hint:=StringGrid1.Cells[mycol,myrow]
   else
    StringGrid1.hint:='';

  if oldhint<>StringGrid1.hint then Application.CancelHint;
end;
er zeigt aber, was du machen mußt (application.cancelhint, sonst siehst du keinen neuen Hint).
Brauchst das nur an die listbox anpassen und mousetocell mit ItemAtPos auswechseln.

Mfg Frank

Lükes Grundlage der Programmierung:
Es wird nicht funktionieren
(Murphy)
  Mit Zitat antworten Zitat