Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
LCL
»
BeginUpdate, EndUpdate for TScrollBox
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
Elite Arcade
by
Guva
[
Today
at 09:42:26 pm]
Fixed an RV32ec compiler ...
by
MattBradford
[
Today
at 09:42:24 pm]
Rounding issues (only wit...
by
marcov
[
Today
at 08:25:15 pm]
Which quantized model wor...
by
schuler
[
Today
at 07:29:42 pm]
How can I get names of CO...
by
Thaddy
[
Today
at 06:31:26 pm]
FPC Unleashed (async/awai...
by
Fibonacci
[
Today
at 05:42:59 pm]
[Closed]Indy10 hangs the ...
by
marcov
[
Today
at 03:52:59 pm]
Slow app start on M5 MacB...
by
pleumann
[
Today
at 03:07:54 pm]
Review from FreePascal
by
threedslider
[
Today
at 02:39:31 pm]
Lazarus components
by
threedslider
[
Today
at 02:37:23 pm]
Many recent books on Laza...
by
threedslider
[
Today
at 02:27:45 pm]
[Solved]Setting the CURSO...
by
jamie
[
Today
at 11:33:52 am]
Network drop and firewall
by
LeP
[
Today
at 09:58:07 am]
Lazarus for Windows on aa...
by
Thaddy
[
Today
at 09:39:06 am]
FastCGI vs. CGI
by
egsuh
[
Today
at 06:33:08 am]
I have made some progress...
by
onionmixer
[
Today
at 12:32:08 am]
Lazarus Bugfix Release 4....
by
n7800
[July 19, 2026, 10:59:09 pm]
Can not load postgres cli...
by
martinm
[July 19, 2026, 10:17:31 pm]
Gtk3 widgetset - call for...
by
zeljko
[July 19, 2026, 08:21:54 pm]
an error occurred while c...
by
Seenkao
[July 19, 2026, 07:29:14 pm]
RichMemo and GTK3
by
dsiders
[July 19, 2026, 05:15:45 pm]
Desktop Shortcut
by
J-G
[July 19, 2026, 04:49:33 pm]
ProDAW
by
jamie
[July 19, 2026, 04:14:20 pm]
[ANN] fpGUI Toolkit v2.1....
by
cdbc
[July 19, 2026, 01:41:07 pm]
Ask AI to make fast HEX t...
by
paweld
[July 19, 2026, 01:23:08 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: BeginUpdate, EndUpdate for TScrollBox (Read 2288 times)
LemonParty
Hero Member
Posts: 562
BeginUpdate, EndUpdate for TScrollBox
«
on:
August 15, 2025, 07:03:43 pm »
Hello.
I have a scroll box and I change positions of many contained controls. At first time this become laggy. Is there BeginUpdate, EndUpdate for scroll box?
Logged
Lazarus v. 4.99. FPC v. 3.3.1. Windows 11
Thaddy
Hero Member
Posts: 19472
Glad to be alive.
Re: BeginUpdate, EndUpdate for TScrollBox
«
Reply #1 on:
August 15, 2025, 07:11:09 pm »
use begin/endupdate from the parent control that contains all controls that change.
Logged
Any "programmer" that knows only one programming language is not a programmer
LemonParty
Hero Member
Posts: 562
Re: BeginUpdate, EndUpdate for TScrollBox
«
Reply #2 on:
August 15, 2025, 07:29:09 pm »
My parent control is the scroll box. And scroll box have no methods Begin/EndUpdate.
Logged
Lazarus v. 4.99. FPC v. 3.3.1. Windows 11
marcov
Administrator
Hero Member
Posts: 12959
FPC developer.
Re: BeginUpdate, EndUpdate for TScrollBox
«
Reply #3 on:
August 15, 2025, 11:05:05 pm »
Yes. Delphi also has this problem, so I assume it is a win32 issue. I have a few helpers for that like
Code: Pascal
[Select]
[+]
[-]
procedure
Scrollbarseteventlessposition
(
scr
:
TScrollbar
;
def
:
integer
)
;
var
oldevent
:
TNotifyEvent
;
begin
oldevent
:
=
scr
.
OnChange
;
scr
.
onchange
:
=
nil
;
scr
.
Position
:
=
def
;
scr
.
OnChange
:
=
oldevent
;
end
;
procedure
Scrollbarseteventlesspositionminmax
(
scr
:
TScrollbar
;
def
,
min
,
max
:
integer
)
;
var
oldevent
:
TNotifyEvent
;
begin
oldevent
:
=
scr
.
OnChange
;
scr
.
onchange
:
=
nil
;
scr
.
SetParams
(
def
,
min
,
max
)
;
scr
.
OnChange
:
=
oldevent
;
end
;
Logged
LemonParty
Hero Member
Posts: 562
Re: BeginUpdate, EndUpdate for TScrollBox
«
Reply #4 on:
August 15, 2025, 11:20:46 pm »
I found that when set the scroll box property
Visible
to False, then do changes and then set to True lags not occur.
Logged
Lazarus v. 4.99. FPC v. 3.3.1. Windows 11
jamie
Hero Member
Posts: 7855
Re: BeginUpdate, EndUpdate for TScrollBox
«
Reply #5 on:
August 16, 2025, 08:01:13 pm »
There is a BeginFormUpdate and EndFormUpdate that may work for you.
Logged
The only true wisdom is knowing you know nothing
LemonParty
Hero Member
Posts: 562
Re: BeginUpdate, EndUpdate for TScrollBox
«
Reply #6 on:
August 17, 2025, 02:39:28 pm »
Quote from: jamie on August 16, 2025, 08:01:13 pm
There is a BeginFormUpdate and EndFormUpdate that may work for you.
This works too. Thank you.
Logged
Lazarus v. 4.99. FPC v. 3.3.1. Windows 11
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
LCL
»
BeginUpdate, EndUpdate for TScrollBox
TinyPortal
© 2005-2018