More Flicker on Windows

Thanks to the work of @Julian Samphire, I’ve learned a lot of things recently about controlling flicker. Unfortunately it’s not straight forward or simple for many (or most?) of us.

As can be seen here, it’s anything but simple.

Nevertheless I love Xojo and decided to learn all I can while the issue is being discussed.

I decided to try resolving the windows flicker in the project mentioned above. I’m pleased with the progress I’ve been able to make, but I noticed that after resizing the window things go wonky and start flickering again until the app is restarted.

https://www.dropbox.com/s/k0rjas5j2kwetn0/StackView%20test.xojo_binary_project?raw=1

I’ve encrypted the main class because my intention was not to compete with @Martin Trippensee . @Julian Samphire If you want the encrypted project I can PM you a link.

Its ok, this is the same problem I am currently finding in my tests. I’ve yet to find a way around the “flicker appears after resizing the window” problem.

Could it be that the original zorder is restored when the window is resized ?

I don’t think so. I’ve tried saving the order of the controls into an array during the intitial zOrderFix, and the running a method zOrderRefix that used the array to run the same code as zOrderFix on the same controls in the same order. I can’t figure out what it is.

Another think is that it seems like a scrollbar causes it’s parent to refresh every time the valuechanged event is fired. I had to freeze the window when scrolling and manually refresh the areas that needed it.

I wonder what possibly could be going on. Moving the window doesn’t do it, only resizing.

Took the great project with the scrolling CC from @Julian Samphire .
Changed it a bit: since I need scrolling CC on just a part of the Window,
I’ve put hist CC on top of another CC which also has the scrollbar on it.
Looks like this:

Did you follow Normans 5 easy steps?

https://forum.xojo.com/conversation/post/346447

I did all the 5 points.

Next, when you put the container control on a tab- or page-panel then you get things completely messed up and not refreshed.

I was being sarcastic. It’s not 5 easy points. I’m looking at the tab panel thing. That does really botch things up.

How about this? The IDE is on the left for comparison.
If placing in a tab you need to set the container.parent = nil then manually manage visibility when the tabvalue changes.

Tested on Win, Mac, Linux…
https://www.dropbox.com/s/k0rjas5j2kwetn0/StackView%20test.xojo_binary_project?raw=1

feedback://showreport?report_id=49245

Just a quick look.
It’s really smart work you come up with here.
Hope some of this work can once be included in the framework.

Mind there are some NilObjectExecptions to get fixed.

How did you get a nilobjectexception?

Hi Neil,

First - this is a magnificent bit of work.

As for the NOE, the project is missing the OnButton/OffButton images.

Oops I missed that.
This should work better.

https://www.dropbox.com/s/lngk4dgcks2a3ul/StackView%20test.zip?raw=1

Thanks, Neil. Giving it a new once-over.

There are still some dead ends in regard to flicker. I’ve done a lot of fooling around and wouldn’t have gotten anywhere close to this without help from @Julian Samphire . The most notable one is after the window is resized flicker again begins until the app is restarted. Also when animating the collapse/axpand for the container that is over the tabcontrol there is flicker.

[quote=346569:@Neil Burkholder]How about this? The IDE is on the left for comparison.
If placing in a tab you need to set the container.parent = nil then manually manage visibility when the tabvalue changes.

Tested on Win, Mac, Linux…
https://www.dropbox.com/s/k0rjas5j2kwetn0/StackView%20test.xojo_binary_project?raw=1

feedback://showreport?report_id=49245[/quote]

Which is linux distro that you have tested this app? If I remember correctly, Linux has own issue on scrolling a tall container placed inside a short container.

I tested on Ubuntu 16.04 LTS

You’re right the child container scrolls off the top of it’s parent and displays in the main window outside the bounds of it’s parent container. I’ll look into it.