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
Lazarus broke my project
by
af0815
[
Today
at 10:59:53 am]
SandTris (Tetris variant)
by
Boleeman
[
Today
at 10:43:15 am]
Fpcupdeluxe
by
DonAlfredo
[
Today
at 10:39:15 am]
Lowercase Drive in LAZ 4....
by
JuhaManninen
[
Today
at 10:18:09 am]
New Mac mini M4 - FPC 3.2...
by
mischi
[
Today
at 09:32:46 am]
Get "serial number" of (r...
by
Thaddy
[
Today
at 09:25:53 am]
Some testing the water qu...
by
paweld
[
Today
at 07:07:33 am]
WaveFunction Collapse
by
Boleeman
[
Today
at 04:11:50 am]
Free Vision Build Failing...
by
swissbob
[November 15, 2025, 11:54:34 pm]
Add new unit to a Lazarus...
by
n7800
[November 15, 2025, 11:50:01 pm]
Programmatic filtering in...
by
jamie
[November 15, 2025, 08:05:46 pm]
How to hide IEEE754 limit...
by
srvaldez
[November 15, 2025, 07:42:38 pm]
This worries me about our...
by
Curt Carpenter
[November 15, 2025, 06:32:55 pm]
Porting PDF Viewer from D...
by
Boleeman
[November 15, 2025, 06:21:52 pm]
Form scaling aspect ratio
by
jamie
[November 15, 2025, 05:01:41 pm]
Demo #3 of my "home grown...
by
TBMan
[November 15, 2025, 03:05:57 pm]
Seems like good timing to...
by
mdlueck
[November 15, 2025, 02:17:23 pm]
Lazarus Bugfix Release 4...
by
jwdietrich
[November 15, 2025, 01:54:34 pm]
synedit
by
Martin_fr
[November 15, 2025, 01:49:12 pm]
[SOLVED] How to update 'F...
by
Hartmut
[November 15, 2025, 01:33:36 pm]
Help with search and repa...
by
avk
[November 15, 2025, 07:09:59 am]
Variable "xyz" doesn't no...
by
Mr.Madguy
[November 15, 2025, 06:22:15 am]
Problem Installing CHM He...
by
Curt Carpenter
[November 15, 2025, 03:03:11 am]
EditorMacroScript did not...
by
jamie
[November 15, 2025, 02:55:41 am]
Mapping Images Like Odome...
by
SandyG
[November 14, 2025, 11:53:01 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: BeginUpdate, EndUpdate for TScrollBox (Read 2132 times)
LemonParty
Sr. Member
Posts: 373
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: 18374
Here stood a man who saw the Elbe and jumped it.
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
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.
LemonParty
Sr. Member
Posts: 373
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: 12537
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
Sr. Member
Posts: 373
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: 7323
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
Sr. Member
Posts: 373
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