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
class not found
by
SA.Blackmon
[
Today
at 02:02:29 am]
Extended Module Player
by
Gigatron
[March 11, 2026, 11:33:54 pm]
Any way to "embed" Window...
by
jamie
[March 11, 2026, 11:02:08 pm]
A collection of daily *NI...
by
Roland57
[March 11, 2026, 06:40:37 pm]
Pipewire API
by
Fred vS
[March 11, 2026, 05:47:15 pm]
[ANN] PasBuild 1.6.0 rele...
by
cdbc
[March 11, 2026, 05:07:14 pm]
ShortStrings vs long stri...
by
marcov
[March 11, 2026, 03:30:18 pm]
88 year D. Knuth changes ...
by
Curt Carpenter
[March 11, 2026, 03:08:55 pm]
[ANN] PasBuild 1.5.0 rele...
by
Graeme
[March 11, 2026, 02:30:32 pm]
CADSys4 3D.
by
zamtmn
[March 11, 2026, 02:13:31 pm]
Synchronizing Lazarus pro...
by
marcov
[March 11, 2026, 01:09:21 pm]
Need help with project ma...
by
dseligo
[March 11, 2026, 12:12:04 pm]
Debian removes FPC/Lazaru...
by
marcov
[March 11, 2026, 11:58:36 am]
Qt6/Wayland clipboard: pa...
by
zeljko
[March 11, 2026, 11:53:24 am]
Questions about TFuncSeri...
by
hedgehog
[March 11, 2026, 09:50:46 am]
macOS 14+ Install Instruc...
by
CM630
[March 11, 2026, 07:56:45 am]
Update a table with an Au...
by
CraigC
[March 10, 2026, 10:54:23 pm]
TSplitter color property ...
by
backprop
[March 10, 2026, 08:43:28 pm]
Z80 ZX Spectrum and Syste...
by
Cascade
[March 10, 2026, 08:22:14 pm]
could Ardour's YTK be use...
by
robert rozee
[March 10, 2026, 03:18:36 pm]
[revisited] triple click
by
Thaddy
[March 10, 2026, 01:08:40 pm]
Hello! Anything new?
by
JuhaManninen
[March 10, 2026, 11:22:16 am]
C/C++ code to Object Pasc...
by
domasz
[March 10, 2026, 10:44:20 am]
[Solved] Saving a workboo...
by
Kaljakoira
[March 10, 2026, 09:09:59 am]
Good GPU accelerated math...
by
myisjwj
[March 10, 2026, 03:17:06 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to disable autoscroll in TRichMemo (Read 381 times)
CM630
Hero Member
Posts: 1642
Не съм сигурен, че те разбирам.
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: 1642
Не съм сигурен, че те разбирам.
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