Fix for Canvas.Scroll not redrawing child controls during scroll

I just posted a sample program to help with a problem that was raised on a feedback ticket I happened to come across and thought I’d post a copy here for people to find if they have the same problem.



Just a proof of concept, you can fancy it up if it works for you :slight_smile:

While your fix seems to work for the example you posted the same techniques dont seem to work with the examples that are similar to Thoms app

Oh, I read/watched it as if Tom was embedding controls on a canvas, I didnt know what he was also putting them in a container control, is he?

Are you testing my app on bare metal Norman, or in VM as I notice that your first post in the ticket says that you cant replicate it until you embed a canvas into a container control.

My app shows exactly the same problem that Tom is showing in the video just using a canvas and its also being fixed.

That being said, I downloaded your untitled example from the ticket and “fixed” that as best I can at the moment.

As its a canvas control embedded in a container control with embedded controls in the canvas the fix is operating differently. Most notably are the flickering buttons yet in this version the radio buttons are not causing issue (I think Tom might be able to live with that as he was living with a total flickering form before and he doesnt seem to have many buttons on his scrolling form).

Anyway, all this changes again if you have the scrollbar embedded inside the container control. I guess it would be best if Tom provided a stripped down/simple example of the problem that I can fix. I’ll put this post into the ticket, he might pick it up and upload an example of what he needs fixing.

Fun and games.

Well that is interesting.

Bevel Buttons, being a custom drawn control by the framework (RB_Pane) flicker in the above fix, but Generic Buttons (Button) dont. Thats something I hadn’t noticed before.

However, as soon as a Generic Button is added to the control, the Radio buttons start flickering.

I see Xojo is working on this internally now, I’ll leave it alone then.

Does Tom embed a canvas in a container that is then dynamically embedded in a window ? yes
That’s why I posted the examples on the case I did - so they mimic his set up reasonably closely (which I’ve discussed with him offlist)
Which is why I pointed out that your sample doesn’t mimic his app
So it doesn’t help that much unless he wants to rewrite the app
Your fix would require a huge rewrite of the app architecture which I suspect is a non-starter (but thats for Tom to decide not me)

And just to make sure that fixes dont mess one up & make others work I test on
hardware (Windows 7 Pro) and vm’s (windows 7, Window8, Windows 8.1, Windows 10)
hardware for macOS (10.9, 10.10, 10.11, 10.12, 10.13)
vms for linux (centos 6,7, ubuntu 16.04, 16.10, mint 18.1 mint 18.2)

Thanks, gents: I really appreciate you looking into this, and I’m looking forward to seeing the fix that’s been made.