mhervais
asked on
speeding up the hint display
In a listbox, I wanted to code a hint on mousemove.
I coded this :
procedure TFMagicWinner.ListBox2Mous eMove(Send er: TObject;
Shift: TShiftState; X, Y: Integer);
var
p : TPoint;
itemnum : integer;
begin
p.x := x;
p.y := y;
itemnum := listbox2.Itematpos(p, true);
if itemnum > -1 then
begin
ListBox2.showhint := false;
listbox2oldpos := itemnum;
ListBox2.hint := ListBox2.Items[ItemNum];
ListBox2.showhint := true;
end;
end;
it works fine when I enter on the control, but when I move the mouse over it, the hint is not redisplayed.
The problem does not come from the mousemove event which is triggered correctly but from the fact that I cannot display the hint when I want.
I am sure somebody has a simple solution for that
I coded this :
procedure TFMagicWinner.ListBox2Mous
Shift: TShiftState; X, Y: Integer);
var
p : TPoint;
itemnum : integer;
begin
p.x := x;
p.y := y;
itemnum := listbox2.Itematpos(p, true);
if itemnum > -1 then
begin
ListBox2.showhint := false;
listbox2oldpos := itemnum;
ListBox2.hint := ListBox2.Items[ItemNum];
ListBox2.showhint := true;
end;
end;
it works fine when I enter on the control, but when I move the mouse over it, the hint is not redisplayed.
The problem does not come from the mousemove event which is triggered correctly but from the fact that I cannot display the hint when I want.
I am sure somebody has a simple solution for that
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER