|
Reported by Damien Burke; checked by Jordan Russell
TTreeview.OnMouseUp coordinates differ depending on mouse button used.
Reproducible:
Oh yes. Drop a TTreeview on a form, assign some code to the
OnMouseUp event as follows:
procedure TForm1.TreeView1MouseUp(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
ShowMessage(IntToStr(X)+','+IntToStr(Y));
end;
Run and try a left-click on the tree view followed by a right click
*without moving the mouse* in between. Note the entirely
different coordinates displayed. Suspect right-clicking is returning
screen-based coors whereas left-clicking is (correctly) returning
control client area coors.
Cause: ?
Version: D6. Not present in D4. Not present in D5 (D5 actually fails to
fire the
OnMouseUp event entirely unless you double-right click or move the mouse
a little between depressing and releasing the button).
OS: bug apparent in both Windows 2000 SP2 and Win98SE. |