0

The OnMouseUp event returns the position of the cursor in a TScrollBox. Unfortunately, it seems that the calculation of this position is done with smallints. So, having a quite long panel, the Y returns a negative number because its value is larger than 32K.

Do you have any idea to avoid this problem?

Many thanks.

Etienne.

  • I'm not able to recreate this. The X and Y coordinates are relative to the visible part of the ScrollBox, so in order to have values larger than 32k, you'd have to have a ScrollBox that actually has Height > 32k. But isn't the point of the ScrollBox to host content with large width and/or height, without having large width and height itself? – DNR Feb 16 '17 at 17:00
  • I suggest you review the following link as I think this may be related to the way Windows treats Windowed controls: [Delphi - TScrollBox issue after X number of components](http://stackoverflow.com/questions/14655516/delphi-tscrollbox-issue-after-x-number-of-components) – Rohit Feb 17 '17 at 00:35

0 Answers0