Xojo native controls on a Window w/Scroll - flicker 2019R3.1

Hey all - I have read a lot the posts about windows flicker etc. and I have made sure I am utilizing Windows/Container.Composited = True, I do not overlay controls, and I always use Window/Container/Canvas.paint for any drawings.

I have maybe 8 controls on a window directly (not on a container) and using a scrollbar (live scroll step 1) I am scrolling the control/label’s lastTop - Scroll.Value. Flicker is still noticeable on my Win10 laptop (not VM) (laptop that has a ton of horsepower). I have tried using control/label.transparent = true/false and I don’t get much differing results. (However I will try all of the controls at once to transparent = false based on William’s response here: https://forum.xojo.com/t/how-to-fix-canvas-flicker-in-windows-7-8-10/38483/130)

Obviously the built in windows apps have scrolling controls with no issues, but I know Xojo’s Windows API is an older one perhaps so there is no double buffering concept in those controls when drawn. So my question is what else can I do besides removing the control for a tab based approach. I took note of some UIFreeze Declares for listbox updates, but I am not needing that at this point.

Thanks in Advance.
Mike

I also will try Julians zOrderFix also but this seems to help overlapping controls (circa 2017).

https://www.dropbox.com/s/pu5k486xfuffrwa/BugZOrderWithWindowProc.xojo_binary_project?raw=1

yeah ANY control marked transparent can give you issues

Xojo uses Win32 directly and there is no support for transparency there - so Xojo has implemented a pseudo transparency mechanism of their own

  1. use invalidate, mostly, instead of refresh (On Windows there are still times you need to use refresh instead)

  2. use a boolean constant for the “transparency” - make it have two instance values
    macOS any language set to true
    Windows and language set to false

  3. then for each control assign this constant to the transparent property of each control

Now you can alter the transparency setting for all controls easily

IF you’re using a text based project then you can do the replacement quickly in the text files when you save your project

Freeze updates shouldnt be required and can exacerbate issues since you wont get a smooth animation of the scrolling

It may be better to put all you control on a canvas and scroll the canvas

if Julian would join he may have other advice

1 Like

Thank you so much @npalardy!!! I very much appreciate your guidance. I will test some more.

Try to help we do :slight_smile:

1 Like