Why not implement .Net ?

Here is an example of a WPF app, thrown together without a single line of code.

Never mind that this wouldn’t even be possible to achieve in Xojo. But… this is what people expect apps to act like now-a-days.

Neil, for some reason, the picture does not show here. I post the link :
https://www.dropbox.com/s/rbpikzjamfabm6o/WPF%20Scrolling%20Container.gif?raw=1

[quote=346031:@Michel Bujardet]Neil, for some reason, the picture does not show here. I post the link :
https://www.dropbox.com/s/rbpikzjamfabm6o/WPF%20Scrolling%20Container.gif?raw=1[/quote]

It shows once for me, it doesn’t auto-loop so ends on a blank page.

Julian, that’s because you only need once to get it. The rest of us need the loop. :wink:

It’s getting attention at the moment because I got fed up with people making excuses about the reasons for flicker in Windows without seemingly knowing what the root causes were.

I spent a few hours looking into it and found some serious flaws, I posted about it and it went mostly unnoticed. It was brought up again as a few more developers experienced problems with flicker so I looked into it further and decided to bring it to the attention of windows developers. I’ve probably spent a week in all working on the problem, trying to figure out how things are being done in Xojo, what can be done and what might be the best way forward. I have code fixes waiting that I haven’t published yet because I need to do a fair bit of work to circumvent the way Xojo is doing things just to test theories.

I develop in Windows and have done for 20+ years. I only tried Xojo because I didn’t want to be distracted by learning more languages to develop for Mac and Linux. After paying >$1000 for a licence and plugins I soon realised that there was a disparity between the marketing and actual real life usage.

Look at the labels above, the fact that this problem has been evident since the middle of 2015 highlights (at least to me) the seriousness that the Windows platform has in the eyes of Xojo. No serious commercial Windows app could be shipped with that problem, as soon as someone hits TAB on a form all the labels start getting darker, the more TAB is used the darker they get until they are almost illegible. This is mickey mouse stuff and its been in there for around 2 years!!! I reported it in Feb 2017 which got marked as duplicate of another ticket from December 2016 but it’s been there since 2015. Now, the fact that it took almost a year and a half to be reported might be an indication of how few Windows developers there are in Xojo or it might be that people just can’t be bothered to report the problem and choose to use a canvas with custom drawn text instead, who knows. But it’s still there.

I’m not kicking up a fuss about that problem yet as I’m hoping that it will be fixed with the re-work of the framework to address the flickering issues.

If you want to see how overrated it is, I made a video back at the start of August when I was trying to help Massimo with some flicker problems which shows the difference between a .Net window and a Xojo window and how best to mitigate/remove the problems.

https://www.dropbox.com/s/mdby1fwxp1b19i4/FlickerProblems.mp4?raw=1

During the 10 minute video I happened to come across the following bugs/issues most of which I have reported since or have been reported already.

1:50 Nvidia share/shadowplay issue <https://xojo.com/issue/47541>
2:20 Radio control refresh issue <https://xojo.com/issue/49004>
3:40 Flickering of container controls with a background colour set and erase background turned on (not yet reported)
4:33 Extra refresh when releasing the mouse after a window resize <https://xojo.com/issue/49006>
4:57 Pressing tab will darken all label controls that are set to transparent (default) <https://xojo.com/issue/46975> <https://xojo.com/issue/46398>
5:08 Freshing all label controls in a container control when focus is changed while pressing TAB (not yet reported)

Not a bad list for a 10 minute video on a simple form.

Every time I use Xojo I seem to be able to find a new bug, my current bug text file has 5 entries, I keep them in a text file now so I’m actually productive with my projects otherwise I can spend all day reporting bugs. These days I have to be in the right frame of mind to post them. It’s heart breaking to spend 15-30 minutes writing a sample program to show the problem, submit it with a description, pictures and video (if needed) to feedback only to have it instantly marked as duplicate because someone at Xojo has already found the problem two years ago but hasn’t marked their ticket as public (I can only assume so people don’t see the problems until a user finds it) so my initial search for the problem was futile and the time I just spent crafting that ticket was a complete waste of time. It’s even more heartbreaking to have a ticket confirmed then put on the back burner for over a year, tickets which highlight core windows functionality issues.

As for .Net, its not a magic bullet. I’ve said it before and I’ll say it again. .Net is simply a framework just like Xojo, it wraps up calls to the core win32 api. Xojo could be implemented in exactly the same way as .Net without using it directly. However, there are issues using .Net that some people are unaware of which is why Xojo decided to go the route they did. Admittedly they haven’t implemented it perfectly but that is what we’re trying to address by highlighting it and discussing it. IMHO everyone’s points are being wasted adding them to <https://xojo.com/issue/28733>, they should be put into <https://xojo.com/issue/47001> to try and make this happen as soon as humanly possible.

Give it a try with 50 labels and 25 other controls on it. On mac perfect, on windows just what it is.
Because this is the reason to have a scrolling control, you don’t know in advance how long the form beased on user-specs will get. Got worse with the move to Direct2D.

Look and feel aside… most things are possible, the radios would be a problem here if the form was longer but:

EDIT: The main issue is that these things can sometimes be neither easy nor intuitive.

it is really unbelievable Julian can fix the flickering and Xojo Inc can not. Odd …

@Julian: Your persistence about this is fantastic! Keep up the good work and keep pushing the right buttons so Xojo Inc wakes up regarding the Windows flickering issues. :slight_smile:

@Christoph De Vocht (and others) While I am generally in agreement with the general message, let’s be careful not to turn this into an us and them kind of thing. Nobody would benefit. I subscribe to @'s approach (“the right frame of mind”) in this matter. Besides, facts win more battles than opinions. This is where I end this opinion post. :wink:

Exactly! Mere mortals have a hard time figuring it out.

PS. I would love to see that sample project.

You are right. I was just referring to some replies Xojo Inc did in the past. In short, they said the flickering is normal behaviour and little can be done.
Recently Geoff told us they are looking into this now. So there is some hope it will be address in the near future.

https://www.dropbox.com/s/2ql7il2yuywkrec/ScollTestFlickerFixVerticalClean.xojo_binary_project?dl=1

This is a sanitised version with all my testing code removed.

Don’t be disappointed by the simplicity of the fix :wink: it took a fair bit of testing over a few days to get that to work back when I didn’t know as much as I do now :wink:

As mentioned earlier, radio’s will be a problem if they are moved off the screen and back on (<https://xojo.com/issue/49004>)

Whew! I’m starting to feel like a novice again.

How about nested containers?

https://www.dropbox.com/s/fztpnrz42o0mflh/ScollTestFlickerFixVerticalClean.xojo_binary_project?raw=1

[quote=346094:@Christoph De Vocht]You are right. I was just referring to some replies Xojo Inc did in the past. In short, they said the flickering is normal behaviour and little can be done.
Recently Geoff told us they are looking into this now. So there is some hope it will be address in the near future.[/quote]
More correct to say “in the future”
What we’re looking into is a significant overhaul of how the current Win32 based framework for windows works
<https://xojo.com/issue/47001>

@ - congratulations this is f…ing simple and works without much flicker, even if I add 20 labels to it.
But if you want to have it nicely into you application, for example like this below, you have some calculation work to do which could introduce some flickering again.

I used to implement this with a containercontrol based on a canvas and a scrollbar, and embethwithin the contrainercontrol we’d like to see scrolling. Simple and quickly repeatable when the prefab is done, but I have to work with delegates in order to get the events thrown.

[quote=346103:@Neil Burkholder]Whew! I’m starting to feel like a novice again.

How about nested containers?

https://www.dropbox.com/s/fztpnrz42o0mflh/ScollTestFlickerFixVerticalClean.xojo_binary_project?raw=1[/quote]

For that one, just turn on Transparent for ContainerControl111 inside ContainerControl1 and turn off EraseBackground

https://www.dropbox.com/s/akk00bq60jhvv5x/ScollTestFlickerFixVerticalCleanNested.xojo_binary_project?dl=1

Amazing!

I’m re-remembering that ‘what I don’t know’ > ‘what I do know’. :slight_smile: Like the more I learn the more I realize what is left to learn!

[quote=346119:@]For that one, just turn on Transparent for ContainerControl111 inside ContainerControl1 and turn off EraseBackground

https://www.dropbox.com/s/akk00bq60jhvv5x/ScollTestFlickerFixVerticalCleanNested.xojo_binary_project?dl=1[/quote]

I am amazed, Julian. You really nailed it. I really hope William finds a way to implement what you have discovered.

But in the meantime, you brought a huge step forward to Xojo Windows developers. Congratulations !

I’m just happy that you guys can get on with your projects :slight_smile:

@

One more. And I was determined to figure it out on my own, but finally gave up.

How about scrolling within a container?

https://www.dropbox.com/s/fztpnrz42o0mflh/ScollTestFlickerFixVerticalClean.xojo_binary_project?raw=1