Lazarus

Programming => General => Topic started by: madref on June 14, 2018, 12:49:11 am

Title: [Solved] Form update
Post by: madref on June 14, 2018, 12:49:11 am
Due to my programming is have a very nasty screen flicker when I am updating my screen.
I have search the forum but I can't find any relevant topics on this (maybe it's just me).


But is it possible to 'disable' the form , update your form and then show the updated form?
Title: Re: Form update
Post by: lainz on June 14, 2018, 12:50:57 am
No, is not just you. If you change a lot of UI elements it becomes slow.

You can try using BeginUpdate and EndUpdate in those controls that has it.

Another way is to Enabled := False, then in a try.. finally part enable it again.
Title: Re: Form update
Post by: madref on June 14, 2018, 11:24:22 am
After fooling around with my code I came to the following solution.
The parts that flickered the most I put in a GroupBox or Panel.
I disabled the visibility, updated the components and then put the visibility back.
No more flickering from updating components.


It's not ideal, but effective.
Title: Re: [Solved] Form update
Post by: lainz on June 14, 2018, 07:05:00 pm
I understand that. I had to do the same for a project that heavily uses UI.