TPageControl.MouseMove: x,y in params differ from ScreentToClient(Mouse.CursorPos)
Original Reporter info from Mantis: Martin @martin_frb
-
Reporter name: Martin Friebe
Original Reporter info from Mantis: Martin @martin_frb
- Reporter name: Martin Friebe
Description:
Maybe same for other mouse events....
procedure TForm1.PageControl1MouseMoveMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
var
p,: TPoint;
begin
p:=Mouse.CursorPos;
p:=PageControl1.ScreenToClient(p);
writeln('MSG: ',x,',',y,' // CursorPos: ',DbgS(p) );
end;
This code is called when moving mouse over the tabs/header area.
Then ClientToScreen(CursorPos) values are bigger than the param x/y.
For both values the increment is about 7
For any other control, the code above returns the same values for both ways to get the mouse.
(Note, there may be a 1 or 2 pixel diff, because the mouse moved since the event was created, and Mouse.CursorPos reflects that move. But the excent above is not within that margin.)
Mantis conversion info:
- Mantis ID: 38553
- OS: Mac
- OS Build: BigSur
- Build: 64676
- Platform: Cocoa
- Version: 2.1 (SVN)