Setting TMemo.VertScrollBar.Position does not scroll the text field
Original Reporter info from Mantis: henrik
-
Reporter name: Henrik Bøgeelund
Original Reporter info from Mantis: henrik
- Reporter name: Henrik Bøgeelund
Description:
This issue has been brought up multiple times, in various forums, over the past many years. But as far as I can see it has not previous been reported here.
I need to scroll the text in a TMemo automatically.
To do this I set the value of TMemo.VertScrollBox.Position.
Setting Position moves the thumb of the ScrollBar, but the text does not scroll.
Steps to reproduce:
The attached zip file contains a demo project which shows the problem.
Build and run the program, and press the button a number of times.
If it works like it does for me, then you will notice that the thumb of the scroll bar moves down, but the text doesn't scroll.
Now move the mouse over the thumb, and give it a click, you will now see that the text jumps to the line which matches the scroll bar position.
The png (included in the zip) shows two screen shots of the program.
On the left screen shot I pressed the button 46 times, so the thumb is about half way down the scroll bar, but the text field still shows the top line.
On the right screen shot the scroll bar is still at position 46, and I have clicked the thumb with the mouse. Now the text field is aligned with the scroll bar and top line is line 46.
Additional information:
Please note that I have tried this on earlier versions of Lazarus and Windows with the same result.
I have not tried it on Linux, so it might be a Windows-only problem.