Icon View Incident Report

Serious Serious
Reported By: Richard
Reported On: 10/14/2014
For: Version 1.04 Build 1
# 4098 Mouse Event Coordinates Do Not Reflect Scrolling Browser Window

X and Y values in OnMouseDown event appear to be relative to desktop and not client area of clicked control.

Reproduce as follows:

1. Create a form application and set desktop to be very wide/high so that scrolling will occur.
2. Place a TLabel near bottom of form.
3. Define an OnMouseDown event handle for the form.
4. Add the following code to the form's OnMouseDown event handler:

Label1.Caption:=IntToStr(X)+','+IntToStr(Y);

5. Run the application and click the form just to the right of the label. Notice the X and Y values.
6. Scroll the desktop down until the form is only partially visible but the label can still be seen.
7. Click the form at the same location as before and notice that the Y value is much smaller than before. Same situation for X if the desktop is scrolled to the right.

Appears that the X and Y values in OnMouseDown are relative to the desktop when the expectation is that they should be relative to the client area of the clicked control regardless of how the desktop is scrolled.

Note that this seems to occur for any control and may also be a problem in other event handlers such as OnMouseUp, etc.

This is problematic when implementing a drawing app using the TPaint control for example. Clicking and moving the mouse makes offset calculations non-trivial if the desktop is scrolled and points need to be connected relative to the client area of the TPaint.


Resolution Resolution
Fixed Problem on 10/26/2014 in version 1.05 build 1


Products Affected Products Affected
Elevate Web Builder
Elevate Web Builder Trial

Image