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
Form scaling aspect ratio
by
jamie
[
Today
at 05:01:41 pm]
Lazarus broke my project
by
BlackVoid
[
Today
at 04:59:13 pm]
How to hide IEEE754 limit...
by
Hartmut
[
Today
at 04:48:28 pm]
Lowercase Drive in LAZ 4....
by
BrunoK
[
Today
at 04:39:41 pm]
New Mac mini M4 - FPC 3.2...
by
derden
[
Today
at 04:26:31 pm]
Some testing the water qu...
by
mdlueck
[
Today
at 03:19:39 pm]
Demo #3 of my "home grown...
by
TBMan
[
Today
at 03:05:57 pm]
Add new unit to a Lazarus...
by
Lulu
[
Today
at 02:58:02 pm]
Seems like good timing to...
by
mdlueck
[
Today
at 02:17:23 pm]
Lazarus Bugfix Release 4...
by
jwdietrich
[
Today
at 01:54:34 pm]
synedit
by
Martin_fr
[
Today
at 01:49:12 pm]
[SOLVED] How to update 'F...
by
Hartmut
[
Today
at 01:33:36 pm]
Porting PDF Viewer from D...
by
Boleeman
[
Today
at 12:38:46 pm]
This worries me about our...
by
zeljko
[
Today
at 09:25:47 am]
Help with search and repa...
by
avk
[
Today
at 07:09:59 am]
Variable "xyz" doesn't no...
by
Mr.Madguy
[
Today
at 06:22:15 am]
Problem Installing CHM He...
by
Curt Carpenter
[
Today
at 03:03:11 am]
EditorMacroScript did not...
by
jamie
[
Today
at 02:55:41 am]
Mapping Images Like Odome...
by
SandyG
[November 14, 2025, 11:53:01 pm]
Programmatic filtering in...
by
jamie
[November 14, 2025, 11:27:29 pm]
Problem with Qt5 on macOS
by
zeljko
[November 14, 2025, 10:39:24 pm]
Incompatible type in MTPr...
by
LemonParty
[November 14, 2025, 06:36:59 pm]
In fpcsrc, many places ca...
by
AlexTP
[November 14, 2025, 06:15:35 pm]
Postgres, ZEOS and Visual...
by
wp
[November 14, 2025, 05:57:25 pm]
[Solved] Process exited w...
by
d7_2_laz
[November 14, 2025, 05:14:08 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: BeginUpdate, EndUpdate for TScrollBox (Read 2130 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: 18364
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: 12536
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: 7320
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