![]() |
Controls schnell auf einem Panel neu anordnen -ohne Flickern
Hi
Ich habe ein Panel, darauf sollen 50 TEdit-Controls zur Laufzeit dynamisch raufgepackt werden. Klappt ja auch, ist nur langsam. Wenn ich vor dem Erzeugen das Panel unsichtbar mache, und hinterher wieder sichtbar, ist es schon viel schneller, flackert aber. Is klar, ich mach ja auch:
Delphi-Quellcode:
Gibts für TPanels nicht sowas wie 'BeginUpdate'/'EndUpdate'?
MyPanel.Visible := False;
CreateControls; MyPanel.Visible := True; |
Re: Controls schnell auf einem Panel neu anordnen -ohne Flic
Hallo alzaimar,
Shaman zeigt in ![]() Gruß Hawkeye |
Re: Controls schnell auf einem Panel neu anordnen -ohne Flic
|
Re: Controls schnell auf einem Panel neu anordnen -ohne Flic
:dp: Das merkt man immer wieder.
Danke an Euch! |
Re: Controls schnell auf einem Panel neu anordnen -ohne Flic
Kleiner Nachtrag:
Delphi-Quellcode:
dauert 60ms und blinkt (Klar, Visible aus und wieder an)
MyPanel.Visible := False;
CreateControls; MyPanel.Visible := True;
Delphi-Quellcode:
dauert 300ms und blinkt nicht, ist aber eigentlich kein Unterschied zum reinen 'CreateControls'.
LockWindow(MyPanel.Handle);
CreateControls; UnLockWindow(MyPanel.Handle); Aber:
Delphi-Quellcode:
dauert nur 90ms und ist somit perfekt.
LockWindow(MyPanel.Handle);
MyPanel.Visible := False; CreateControls; MyPanel.Visible := True; UnLockWindow(MyPanel.Handle); |
Alle Zeitangaben in WEZ +1. Es ist jetzt 21:33 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz