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
Which Control should I us...
by
J-G
[
Today
at 02:30:55 pm]
[New Component] ExtTabCtr...
by
wp
[
Today
at 02:12:30 pm]
FPC Unleashed (inline var...
by
Khrys
[
Today
at 01:40:07 pm]
ZxTune chiptunes player
by
Guva
[
Today
at 12:41:14 pm]
RunFormula: math expressi...
by
CM630
[
Today
at 12:17:34 pm]
Codepage issue in console...
by
ASerge
[
Today
at 12:13:36 pm]
Mundo Medieval 3D MMORPG ...
by
schuler
[
Today
at 12:02:50 pm]
Onscroll event for Tscrol...
by
laz_one_or2
[
Today
at 11:16:39 am]
Fpcupdeluxe
by
CharlyTango
[
Today
at 10:35:33 am]
Compiling Qt6 project on ...
by
wp
[
Today
at 10:14:53 am]
Error with last fixes_3.2...
by
HaraldNieswandt
[
Today
at 10:13:48 am]
What am I missing here? [...
by
loaded
[
Today
at 08:11:06 am]
IDE Editor (OS: Windows11...
by
keith
[
Today
at 07:36:18 am]
Single and Double, Conver...
by
avk
[
Today
at 06:55:03 am]
Content is distorting / w...
by
jamie
[
Today
at 02:55:30 am]
AI Assist Python - to - P...
by
kirtu
[
Today
at 12:57:01 am]
Instruction-level paralle...
by
LeP
[
Today
at 12:23:51 am]
Lazarus syntax helpers
by
Edson
[June 15, 2026, 10:34:34 pm]
Can /my/ AI help me with ...
by
microxa
[June 15, 2026, 08:25:36 pm]
[ANN] PasBuild v1.9.0 Rel...
by
Graeme
[June 15, 2026, 08:14:26 pm]
If FileExists(
by
Remy Lebeau
[June 15, 2026, 07:58:06 pm]
Implementing an Elo ratin...
by
Warfley
[June 15, 2026, 06:33:56 pm]
[SOLVED]Program experienc...
by
Thaddy
[June 15, 2026, 05:39:33 pm]
Message CM_ShowingChanged...
by
AlexTP
[June 15, 2026, 01:21:03 pm]
MOVED: Eye Candy TESCheme
by
theo
[June 15, 2026, 10:06:43 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: BeginUpdate, EndUpdate for TScrollBox (Read 2270 times)
LemonParty
Hero Member
Posts: 537
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: 19272
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
objects are fine constructs. You can even initialize them with constructors.
LemonParty
Hero Member
Posts: 537
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: 12905
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: 537
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: 7774
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: 537
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