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
equivalent to C/C++ "offs...
by
Fibonacci
[
Today
at 02:44:35 am]
Printing on HP Smart Tank
by
jamie
[
Today
at 01:55:25 am]
TCollection wiki entry
by
korba812
[
Today
at 12:20:33 am]
Problems with creating a ...
by
jamie
[
Today
at 12:10:44 am]
UI app to work with SQLit...
by
Tomu
[
Today
at 12:06:09 am]
Fpcupdeluxe
by
cdbc
[July 10, 2026, 11:26:16 pm]
Source Editor Collapsed P...
by
Martin_fr
[July 10, 2026, 11:18:30 pm]
val return code
by
Paolo
[July 10, 2026, 10:58:32 pm]
Gtk3 becomes default widg...
by
PascalDragon
[July 10, 2026, 09:59:25 pm]
Seeking performance feedb...
by
Xenno
[July 10, 2026, 04:31:34 pm]
Pls support Double Comman...
by
Alexx2000
[July 10, 2026, 04:02:56 pm]
Ignoring Exceptions - Hit...
by
Martin_fr
[July 10, 2026, 03:50:47 pm]
Lazarus 4.6 may erase you...
by
Benoni_Edin
[July 10, 2026, 01:22:02 pm]
Greyed out controls?
by
LeP
[July 10, 2026, 12:21:25 pm]
Creating binary
by
marcov
[July 10, 2026, 11:25:17 am]
is there PDS reader/expor...
by
cdbc
[July 10, 2026, 08:59:50 am]
Hello. I'm new to this co...
by
onionmixer
[July 10, 2026, 03:55:53 am]
Selecting from a list of ...
by
J-G
[July 09, 2026, 11:38:39 pm]
Help needed on how to do ...
by
paweld
[July 09, 2026, 10:06:31 pm]
A recreation of the class...
by
count
[July 09, 2026, 08:53:45 pm]
GTK3 is now the default w...
by
bonmario
[July 09, 2026, 07:48:59 pm]
using bass to play sounds
by
Thaddy
[July 09, 2026, 05:57:43 pm]
DDE
by
Thaddy
[July 09, 2026, 05:01:24 pm]
FPC Unleashed (async/awai...
by
Thaddy
[July 09, 2026, 04:38:17 pm]
String constants being di...
by
mihaisheng
[July 09, 2026, 12:25:38 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: BeginUpdate, EndUpdate for TScrollBox (Read 2281 times)
LemonParty
Hero Member
Posts: 554
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: 19386
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: 554
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: 12942
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: 554
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: 7823
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: 554
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