[Lazarus] Testing TMemo.ScrollBy

Ondrej Pokorny lazarus at kluug.net
Sun Nov 29 20:41:54 CET 2015


On 29.11.2015 20:25, Juha Manninen wrote:
> I implemented TCustomMemo.ScrollBy together with fixing issue:
>    http://bugs.freepascal.org/view.php?id=29067
> See my comment there.

Good job!


> Now I need help to test the changes, especially the widgetsets I could
> not test myself.
> Windows experts, is my solution for Windows OK?

On my system (Win 10 64bit), it doesn't scroll. It looks like you have 
to use LM_LINESCROLL (as you also suggested). See patch.
You wrote that you tested Win. What is your configuration? Does the 
LM_LINESCROLL message from the patch work on your OS?

Ondrej
-------------- next part --------------
Index: lcl/interfaces/win32/win32wsstdctrls.pp
===================================================================
--- lcl/interfaces/win32/win32wsstdctrls.pp	(revision 50523)
+++ lcl/interfaces/win32/win32wsstdctrls.pp	(working copy)
@@ -1438,8 +1438,7 @@
 class procedure TWin32WSCustomMemo.ScrollBy(const AWinControl: TWinControl;
   DeltaX, DeltaY: integer);
 begin
-  SendMessage(AWinControl.Handle, EN_HSCROLL, 0, -DeltaX);
-  SendMessage(AWinControl.Handle, EN_VSCROLL, 0, -DeltaY);  // or EM_LINESCROLL
+  SendMessage(AWinControl.Handle, EM_LINESCROLL, -DeltaX, -DeltaY);
 end;
 
 { TWin32WSCustomStaticText }


More information about the Lazarus mailing list