Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
RichMemo
»
How to disable autoscroll in TRichMemo
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
[SOLVED] GTK3 : Icons hav...
by
zeljko
[
Today
at 10:40:09 pm]
Debian releases a Gtk3 La...
by
zeljko
[
Today
at 10:32:15 pm]
Getting results from sql ...
by
CraigC
[
Today
at 10:00:24 pm]
add thumb up or like butt...
by
Martin_fr
[
Today
at 09:35:13 pm]
Problem with drawing orde...
by
wp
[
Today
at 06:26:27 pm]
TChart: Wrong default val...
by
wp
[
Today
at 06:22:26 pm]
Hello! Anything new?
by
simone
[
Today
at 05:47:57 pm]
LAMW Foreground service -...
by
Mongkey
[
Today
at 05:40:05 pm]
could Ardour's YTK be use...
by
Fred vS
[
Today
at 04:59:52 pm]
Any way to "embed" Window...
by
myisjwj
[
Today
at 02:50:41 pm]
mORMot again (HttpServer/...
by
ttomas
[
Today
at 12:45:49 pm]
Is it me or is there some...
by
Martin_fr
[
Today
at 11:48:04 am]
Exiting HeapTrace dump
by
jamie
[
Today
at 11:34:49 am]
CONCAT formula
by
Zvoni
[
Today
at 08:17:21 am]
emuloader: help to resurr...
by
arcadegamer
[March 15, 2026, 08:30:31 pm]
AutoSize TMemo.Height?
by
wp
[March 15, 2026, 05:55:05 pm]
Initialization & finaliza...
by
Martin_fr
[March 15, 2026, 05:24:36 pm]
Possible Enhancement to t...
by
jamie
[March 15, 2026, 04:10:38 pm]
lazarus 4.99 and missing ...
by
wp
[March 15, 2026, 03:11:43 pm]
Questions about TFuncSeri...
by
hedgehog
[March 15, 2026, 06:58:29 am]
CryptoLib4Pascal
by
Xor-el
[March 14, 2026, 06:17:32 pm]
Extended Module Player
by
Gigatron
[March 14, 2026, 05:32:06 pm]
[AGGPas] Difference betwe...
by
Roland57
[March 14, 2026, 04:36:02 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to disable autoscroll in TRichMemo (Read 404 times)
CM630
Hero Member
Posts: 1652
Не съм сигурен, че те разбирам.
How to disable autoscroll in TRichMemo
«
on:
October 29, 2025, 10:59:28 am »
Is there a way to disable autoscroll in TRichMemo?
This code works in TMemo, but does not in TRichMemo:
Code: Pascal
[Select]
[+]
[-]
try
{Rich}
Memo1
.
Lines
.
BeginUpdate
;
for
i
:
=
0
to
50
do
{Rich}
Memo1
.
Append
(
IntToHex
(
i
)
)
;
finally
{Rich}
Memo1
.
Lines
.
EndUpdate
;
end
;
Logged
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2
CM630
Hero Member
Posts: 1652
Не съм сигурен, че те разбирам.
Re: How to disable autoscroll in TRichMemo
«
Reply #1 on:
October 30, 2025, 09:00:11 am »
I have found a solution, but it only works when the vertical scrollbar is enabled; otherwise
RichMemo1.VertScrollBar.Position;
is always a zero. This post was helpful:
https://forum.lazarus.freepascal.org/index.php?topic=65047.0
Code: Pascal
[Select]
[+]
[-]
procedure
TForm1
.
Button1Click
(
Sender
:
TObject
)
;
var
i
:
integer
=
0
;
v
:
integer
=
0
;
begin
v
:
=
RichMemo1
.
VertScrollBar
.
Position
;
RichMemo1
.
Lines
.
BeginUpdate
;
for
i
:
=
0
to
50
do
RichMemo1
.
Append
(
IntToHex
(
i
)
)
;
RichMemo1
.
ScrollBy
(
0
,
MaxInt
)
;
RichMemo1
.
ScrollBy
(
0
,
-
v
)
;
RichMemo1
.
Lines
.
EndUpdate
;
end
;
«
Last Edit: October 30, 2025, 09:03:23 am by CM630
»
Logged
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
RichMemo
»
How to disable autoscroll in TRichMemo
TinyPortal
© 2005-2018