Vertical Scrollbar of TMemo does not reach MAX with calling MemoI1.VertScrollBar.Position:= [max]
Original Reporter info from Mantis: PeterK
-
Reporter name:
Original Reporter info from Mantis: PeterK
- Reporter name:
Description:
When moving the Vertical ScrollBar with the TMemo's Slider You can reach the bottom of the text.
Instead, when calling the same position with
Memo1.VertScrollBar.Position:= [YourIndividualMaxValue];
the Scrollbar always goes one step back, doesn't reach "max" position.
I would expect the bug is somewhere inside controlscrollbar.inc
line 53 - 73 (?) FAutoRange ? MaxPos ?
The bug appeared when I tried to synchronize two "TMemos"
on my Form, to compare the same text, loaded from different sources.
Steps to reproduce:
- put a TMemo on Your Project Form
- let a TEdit show the position of the Vertical ScrollBar by:
Edit1.Caption:= IntToStr( Memo1.VertScrollBar.Position);
(for example by a TTimer Event)
- put a TButton on Your Project Form and write into it's method
procedure TMainForm.Button1Click(Sender: TObject);
begin
Memo1.VertScrollBar.Position:= [max];
end;
- You have to fill up the TMemo with some text to let the VerticalScrollBar
get visible ...(!)
Additional information:
Any Questions are welcome.
If it helps I could write a short demo Project showing this bug - if You like.
Thanks !
Mantis conversion info:
- Mantis ID: 24849
- OS: WinXP
- Build: 41613
- Platform: Windows
- Version: 1.0.10