Recent

Author Topic: [SOLVED] Splitter causes lines in the form  (Read 926 times)

Hansvb

  • Hero Member
  • *****
  • Posts: 871
[SOLVED] Splitter causes lines in the form
« on: April 22, 2023, 02:57:44 pm »
Hi,

On a Form I have a few panels and a few splitters. When i drag a slpitter  to the right a lot of lines apear in the form. Double buffered is on. How can i avoid this? See print screen.
Windows 11  and lazarus 2.2.4.



« Last Edit: April 22, 2023, 06:59:21 pm by Hansvb »

jamie

  • Hero Member
  • *****
  • Posts: 7493
Re: Splitter causes lines in the form
« Reply #1 on: April 22, 2023, 03:40:37 pm »
call the Repaint even for the parent control during the Onpaint of this control.

or call the Repaint of the parent in the onMoved event .

You can also call it during the OnChangeBounds etc.
The only true wisdom is knowing you know nothing

Hansvb

  • Hero Member
  • *****
  • Posts: 871
Re: Splitter causes lines in the form
« Reply #2 on: April 22, 2023, 06:59:09 pm »
Repaint the parent did it. It was that simple.
Thanks.

wp

  • Hero Member
  • *****
  • Posts: 13334
Re: [SOLVED] Splitter causes lines in the form
« Reply #3 on: April 22, 2023, 08:06:59 pm »
Maybe you overlooked this property like me for many years: The Splitter has a ResizeStyle property which determines the behavour on resizing. The default value rsUpdate causes the adjacent controls to update their size immediately, and I know many cases where this causes a lot of flicker or a stuttering visual impression. I find it is more advantageous when ResizeStyle is at rsLine or rsPattern which just draws a line or a patterned narrow bar, respectively, at the new position and performs the resize operation only at the end.

Hansvb

  • Hero Member
  • *****
  • Posts: 871
Re: [SOLVED] Splitter causes lines in the form
« Reply #4 on: April 24, 2023, 01:54:19 pm »
Hi wp, that seems to work to. I did not notice that property.

 

TinyPortal © 2005-2018