Recent

Author Topic: [SOLVED] TPanel and UI performance  (Read 1089 times)

FrankBKK

  • New Member
  • *
  • Posts: 42
[SOLVED] TPanel and UI performance
« on: March 26, 2024, 04:59:06 am »
I have an older 32bit app compiled with Lazarus 2.0.12 and recompiled it with Lazarus 3.0 on 64bit -
everything worked fine until I thought about giving the UI a facelift.

The app has three forms, three TPageControls with six TTabsheets each and around 100 various components, mostly TLabel, TEdit, some grids etc.
I slapped five Panels and four TSplitter on each TabSheet, to better organize all the components and allow the user to adjust panel sizes.

As a result the whole app now runs rather sluggish and when moving a splitter during runtime it looks like slow motion.
On some heavily loaded panels you can literally watch how the elements are redrawn ...

Do I simply have to use them more sparsely or are there better options ?


« Last Edit: March 26, 2024, 04:44:20 pm by FrankBKK »

d7_2_laz

  • Hero Member
  • *****
  • Posts: 657
Re: TPanel and UI performance
« Reply #1 on: March 26, 2024, 09:51:04 am »
@FrankBKK,  i’d suspect your Splitters ResizeStyle is set to rsUpdate, which might introduce masses of Redraws of Panel & co.
Use ResizeStyle rsLine instead.
Lazarus 4.4  FPC 3.2.2 Win10 64bit

FrankBKK

  • New Member
  • *
  • Posts: 42
Re: TPanel and UI performance
« Reply #2 on: March 26, 2024, 04:43:49 pm »
@FrankBKK,  i’d suspect your Splitters ResizeStyle is set to rsUpdate, which might introduce masses of Redraws of Panel & co.
Use ResizeStyle rsLine instead.

Thank you so much - that was indeed the problem - I was not aware of this option !

 

TinyPortal © 2005-2018