* * *

Author Topic: Flickering TScrollbox  (Read 906 times)

kupferstecher

  • Jr. Member
  • **
  • Posts: 97
Flickering TScrollbox
« on: May 11, 2017, 09:15:02 pm »
Hi,

there is flickering inside a TScrollbox when I set a quantity of controls to visible:= false. Its reproducable, see the attached example project. The flickering occurs on and near to the border of the scrollbox.
DoubleBuffered:= true also doesn't help.

It seems to be fine for BorderStyle:= bsNone. But in the standard configuration (bsSingle) there is this annoying flickering.

Does anyone know how to solve that?

Regards

PS: Same behaviour on Win Vista 32bit, Lazarus 1.6.4
and on Win7 64bit, Lazarus 1.6.

Thaddy

  • Hero Member
  • *****
  • Posts: 4273
Re: Flickering TScrollbox
« Reply #1 on: May 11, 2017, 09:38:00 pm »
Seems to be an off-by-one bug in the case of a border.
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

kupferstecher

  • Jr. Member
  • **
  • Posts: 97
Re: Flickering TScrollbox
« Reply #2 on: May 11, 2017, 10:00:22 pm »
Hm, could be.
Now I also testet on Linux with qt, there the flickering doesn't occur.

ASerge

  • Sr. Member
  • ****
  • Posts: 366
Re: Flickering TScrollbox
« Reply #3 on: May 19, 2017, 11:35:14 pm »
there is flickering inside a TScrollbox when I set a quantity of controls to visible:= false.
Framing with ScrollBox1.DisableAutoSizing and ScrollBox1.EnableAutoSizing will help.

kupferstecher

  • Jr. Member
  • **
  • Posts: 97
Re: Flickering TScrollbox
« Reply #4 on: May 23, 2017, 12:52:15 pm »
Hello ASerge,

now I tried that, for hiding the controls your solution works. But for enabling the visibility there still is flicker.

For now I just use the scrollbox without frame.

Regards

Framing with ScrollBox1.DisableAutoSizing and ScrollBox1.EnableAutoSizing will help.

airpas

  • Full Member
  • ***
  • Posts: 179
Re: Flickering TScrollbox
« Reply #5 on: May 23, 2017, 02:11:18 pm »
i got lot of flickering too with Splitters when it's linked with many controls . i think the procedure TCustomSplitter.MoveSplitter is unoptimized , there is alot of code inside this procedure .

Handoko

  • Hero Member
  • *****
  • Posts: 1416
  • My goal: build my own game engine using Lazarus
Re: Flickering TScrollbox
« Reply #6 on: June 08, 2017, 07:43:49 am »
I cannot reproduce the issue on Linux Gtk2.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus