Annoying flicker of controls on a scrolling canvas

The last time i saw Norman and Geoff talking about the userbase they said both that the Mac and Windows users are about equal in number. I think it’s time that Xojo divides it’s resources now more in favour of Windows. It shouldn’t be so that Windows users only pay the bill for developping for the Mac.

Rob Egal Nov 6 Berlin wrote:
To be honest do not see Xojo using .NET for windows in the next years. How big the user base for
windows? Although Xojo is cross-platform, I am inclined to say most ppl develop for Mac.

I never had any discrimination only amazement with the technology developments and the good things it can do. I am a hospital Scientist and being exposed to windows mostly with limited Mac. I try to do the best I can with what is available to improve health services to the public. throughout my working experience, occasionally I did come across a “few” such views as the one above.
It is sad to hear such views still exist instead of trying to resolve problems and supporting each other. Hopefully not many Windows users didi not follow this thread since I labelled is “ANSWERED” otherwise it may not be to healthy for Xojo. I never had more fun programming till I got Xojo. I members don’t have anything positive to say they should read only and refine their wisdom.
Thank you everyone else building my understanding on this issue.

One of the biggest reasons for me to choose Xojo was because it builds both Mac and Windows apps, and I expect that’s true of a lot of the other Xojo users.

Although I love my Mac, I do think Windows has been neglected in recent years. I don’t really care whether .NET is the solution to flickering, as long as Xojo finds a way around it soon. Dropping support for XP in 2015r3 is a good sign that Xojo wants to move to a more modern implementation for Windows.

[quote=226626:@Michel Bujardet]
Also, when a canvas is used a container, nothing should be placed in Paint.[/quote]

I have a scrolling canvas in which I embed container controls. The canvas used the Paint even to paint the background white. Scrolling with the scrollbar was fine, but after using the mouse wheel, I would get a lot of flicker. After reading the post by @Michel Bujardet , I removed the Paint event and all flicker is gone. But I still want a white background. How do you accomplish this without the flicker?

You may want to create a white picture as backdrop.

Something like this in the Open event of the canas (off the top of my head):

Dim pic as new picture(me.width, me.height, 32) pic.graphics.forecolor = &cFFFFFF pic.graphics.fillrect(0,0,pic.width,pic.height) me.backdrop = pic

If that did not work, you may try to place a white rectangle under the canvas.

It looks like that worked brilliantly!

I’m wondering where else I should change this in my code. Is this only for scrolling canvases? Can you explain when you say, “when a canvas is used as a container” ?

Thank you!

[quote=227799:@Michel Bujardet]You may want to create a white picture as backdrop.

Something like this in the Open event of the canas (off the top of my head):

Dim pic as new picture(me.width, me.height, 32) pic.graphics.forecolor = &cFFFFFF pic.graphics.fillrect(0,0,pic.width,pic.height) me.backdrop = pic
[/quote]

Actually, I just realized the backdrop does not resize with the window. Is there a way to resize it with the window or lock it to the canvas programmatically?

EDIT:
I just added basically the same code to the Resizing event of the window and it works. Although a slight flicker is back now during MouseWheel.

If you place controls on top of a canvas, you are using it as a container.