Listbox garbled with Direct2D

@Massimo Valle : yes, this is usually a lot of work, but Markus is correct. I’ve been in your place last year. Einhugur wasn’t going to update his DataGrid. I wasn’t able to make the component I bought work. After spending weeks with bugs and bugs and more bugs I gave up. For the better part of the year I had to tell customers that they needed to unload data before they could change the widths of the columns in the listbox. Then I spent again weeks implementing a new solution.

No, you’re not.

You already know the ListBox isn’t working for you. Then why insist it SHOULD work for you?

We ALL agree with you that it SHOULD work, but it DOESN’T. And no amount of moaning or wishful thinking is going to change that.

Time to face reality.

The solution is obvious.

Btw what happens if

(a) you DON’T draw alternate row colours

(b) move the ListBox to a different position or set it to a different size

Does it only happen with THIS listbox or others too? If only this one then delete it and put a new one in.

???

Why do you say that?

[quote=368263:@Massimo Valle]Here it’s another example of the problems I’m getting with Xojo 2017r3 Direct2D drawing and listbox:

This is from a customer using Windows Server 2008 R2 from a thin client.
It happens random 2-3 times out of 10
:-([/quote]

Tell those customers to put their animation and such settings down. They have serious redrawing timing issues. This looks like vertical synch is not in synch. That could be because the system graphics load is too high, for the listbox to refresh or redraw intime. Windows server has these kind of issues probably because the systems arn’t that good in graphics.

I have to agree with Massimo on this one. With any sufficiently complex framework of subclasses, you have to select the Xojo version that best fits your criteria. Retreat back to 2016r3 and watch how this plays out. If it looks like Xojo isn’t going to get this fixed, then you start looking at alternatives. But the best short-term solution is to revert back to a stable release.

[quote=368760:@Massimo Valle]I’m super angry, also because it’s years Xojo says they can’t change this and that because “…it would break a lot of existing code.” and suddenly they switch to Direct2D, without giving the ability to choose first. A compatibility mode would have been a wise move in this case.
[/quote]
That’s a valid response. Xojo upset the apple cart with this change, and now we’re stuck with it (unless you choose not to embrace the new releases). I’ll watch this one from the sidelines and stick to releases that work.

Hi Massimo,

This looks very similar to <https://xojo.com/issue/46069> that I reported in 2016r4 beta. I am not sure if you need to be a beta tester to view the feedback case. This lines/text were skewed on many of the controls, and the good news is that Xojo was able to fix it. This looks like an edge case with Windows 2008 R2 Server OS since this bug seems to be fixed on Windows 10 systems.

All I can suggest is to let Xojo staff work on the feedback you created and give them time to fix it. Sorry to hear about the pain your going through.

[quote=368830:@Eugene Dakin]Hi Massimo,

This looks very similar to <https://xojo.com/issue/46069> that I reported in 2016r4 beta.[/quote]

But yours seems related to the IDE, while the problem here is in compiled applications.

Animations and all graphics related options are off.
Sure it can be anything, however the problem shows even under low load.

[quote=368807:@Markus Winter]???

Why do you say that?[/quote]

Because this is my experience after testing a lot of different solutions, either from third party or self made.
A canvas subclass listbox is simply not performing fast enough for our needs.
You previously mentioned https://www.pidog.com/piDogScrollingCanvas/DataView.shtml. Try it with 15/20 columns min and with something like 2000 rows to see. And we have sometimes more rows/columns.
And btw, can you imagine the flickering problems on Windows with canvas based stuff?

We desperately need a better grid since years, supporting more options like pivot tables, draggable columns and much more but none is available. There are tons in Javascript for web as well for .NET and ZERO true alternatives for Xojo, only toy-grids which are nice to show a limited amount of data.
For a minor project I ended up using a Javascript grid in a HTMLViewer, with a considerable amount of efforts and some hacks to communicate with the grid. But this was only to display data and for our mainstream solutions is not applicable.

[quote=368806:@Markus Winter]Btw what happens if

(a) you DON’T draw alternate row colours

(b) move the ListBox to a different position or set it to a different size

Does it only happen with THIS listbox or others too? If only this one then delete it and put a new one in.[/quote]

a) same problem
b) same problem
Others listboxes shows the same behavior, but for some reason this one allow me to reproduce the problem more easily.

And to remark again: this is happening in many different applications/servers/RDP clients/customers therefore it’s unlikely this is a sporadic problem of a single case.

As I said before, I’ve now solved the crisis downgrading to Xojo 2016r3. Other than solving this problem this also solves a lot of other drawing problems we have with Xojo 2017r3.
This costs us a lot of effort and a delay plan for switching to 64 bit but at least the customers are now happy again.

Now I will start testing again 2017r3 to squash the existing problems and feed Xojo with some hints to hopefully solve those damn drawing issues. But for this I also need the Xojo cooperation on fixing the cases
<https://xojo.com/issue/50847>
<https://xojo.com/issue/51030>
<https://xojo.com/issue/50909>

I’m convinced these are somewhat related.

While we are this, let me to point this feedback case <https://xojo.com/issue/48972> from August 2017 where I asked Xojo to please implement the Direct2D drawing as a choice.

This case was closed because they won’t implement it. Sad. :frowning:

[quote=368838:@Massimo Valle]While we are this, let me to point this feedback case <https://xojo.com/issue/48972> from August 2017 where I asked Xojo to please implement the Direct2D drawing as a choice.

This case was closed because they won’t implement it. Sad. :([/quote]
This really cheeses me off. To force Direct2D onto us when it obviously hasn’t been tested basically makes anything after 2016r3 unusable. The fact that Xojo also did it before 64 bit was finished also means that 64 bit Windows GUI apps are also out of the question.
Having the ability to switch between GDI+ and Direct2D until it was stable (like Carbon & Cocoa builds) should have been there initially.

You have to wonder how much decisions like this cost Xojo financially due to existing customers not renewing and prospective customers not liking how crap the MS-Windows builds perform using Direct2D.
It also leaves us developers with a potentially major decision to make of having to move away from Xojo because we need things like 64 bit but cannot use them due to major issues elsewhere in the product.

@Kevin Gale , I had exactly the same feeling when it happened that I even could not move from 2016R3 to 2016R4 due to the sudden movement to D2D, at least not for one existing project. I also disapproved the way the xojo inc team has pushed this through our throat without any choice left and no understanding for the fact that our customers would experience a loss of performance of our applications. The only way to avoid having this is building with 2016R3.
The movement to Chromium for HTML viewer also hit me, since I was using HTML Edit from @Tim Parnell

My tip would be: when archiving a project, make sure you also archive the xojo version and plugins you used to build the deliverable. When it happens you have to add or modify a little, you can just fall back on the archive version.
But, to end positive, on the long run the move to the modern D2D was of course unavoidable.
Meanwhile I started a new project for windows and mac with xojo 2017R3, and it turns out to work acceptable, unless some flickering on Windows of course.

And the license properties… Who knows when you will have to reload/modify the project.