Einhugur StyleGrid Retina Support

Is anyone else waiting for a retina-update of StyleGrid, or have you given up? The last update was 3 years ago. Have you switched to something else, and if so, what did you choose?

I’m waiting for an update to the DataGrid. Haven’t switched, yet, because there is nothing better. Have you asked Björn?

I’m waiting as well. There is also an issue with Cocoa and cell borders I reported that needs to get fixed as well. Really not sure what to do, it is the only viable alternative to the ListBox I have found. Bjorn said the StyleGrid was going to be a pretty big effort to get it up to speed.

What does StyleGrid do that can’t be done with the Xojo listbox with some work?

From just looking at the description on the webpage I don’t see anything you could not do in pure xojo code even without declares, except for drawing the progress bar 'correctly" (which would likely take declares) and locking the first columns (that might be able to be simulated in a container control). Granted it would take non trivial work, but much less than coding your own listbox from scratch.

While I’ve never used it, I know StyeGrid has been around a long time, but I also know things can now be done with the Xojo listbox which were not possible or much harder years ago. IIRC SOME of the features listed are there to overcome limitations that no longer exist.

  • Karen

Hi Karen, for one, on Windows:

Lockdrawing = True

Lockdrawing = False

makes the updates on a busy StyleGrid as smooth as butter. On a Listbox, no such luck. And the make invisible trick works on the Mac but not on Windows. It just disappears for a third of a second, then comes back, make it seem like it is blinking.

For the DataGrid there is only one reason: speed. The listbox is terribly slow. Try to load 100.000 rows with a listbox. For the DataGrid only the needed rows from a database cursor are loaded.

As is the case with Kem’s Data On Demand Listbox sub-class of the native Xojo listbox. We recently began using this, and it is very nice, and reasonably priced. Support has also be very responsive…

@Peter: Had a look at the DoD listbox some years ago, but I wasn’t able to make it work or even look good. I remember problems with the last row and drag-and-drop. If I want to replace the DataGrid I’d rather work with Christian to make something like the list of mails in Mail.

[quote=74494:@Merv Pate]Hi Karen, for one, on Windows:

Lockdrawing = True

Lockdrawing = False

makes the updates on a busy StyleGrid as smooth as butter. On a Listbox, no such luck. And the make invisible trick works on the Mac but not on Windows. It just disappears for a third of a second, then comes back, make it seem like it is blinking.[/quote]

See:
https://forum.xojo.com/6484-tip-removing-flicker-on-windows

I like the variable row height using StyleGrid.

Thanks, Karen, I will take a look at that one. I had tried, “flicker be gone”, see:

https://forum.xojo.com/1965-control-flicker

but that caused my only blue screen I have ever seen on this computer that I have been running for 3 years. I’ll have a look at the above and see if it is of use. Don’t get me wrong, the ListBox is great to work with on smaller data sets and where I need to do custom stuff in the paint and text events. And I find it easier to work with than the StyleGrid. But the StyleGrid is so fast. Plus, I can’t recall, but there was some event that I needed to do something special in my app that the StyleGrid had and the ListBox did not. That was 4 years ago when I was doing that comparison, maybe it was the Redraw lock, who knows I can’t recall. But I will take a look at this in a week or so, thanks.

One other shortcoming of the ListBox that I have not found a workaround for: See feedback #17185. Look at the attached pic I posted to the original problem the user reported. Funny thing is it looks OK on Windows, but not the Mac. Not really a deal breaker for the ListBox, but it sure makes a nice screen look unfinished. Have you seen this before?

I think I know the bottom row issue you’re referring to, and it is a minor cosmetic issue - at least for us it’s minor. We use the DOD listbox as a drag source with no problems, but we’ve not used it as a destination. Did you have problems with either or both?

@Karen:
I spend some hours to evaluate the Xojo listbox… Yes, things have changed since I compared them years ago… As far as I see these are the relevant differences (at least for me) between Xojo LB and StyleGrid:
Retina compatible:

  • Xojo LB
  • StyleGrid

Header appearance control

  • Xojo LB: none
    ± StyleGrid has minimal support for this (the font, font size, font color can be changed, but no header height and background control).

Selection color control

  • Xojo LB: none (this is a killer for me)
  • StyleGrid

Column Drag-Reorder
Xojo LB: none
StyleGrid: none
(I have a hard time to understand why this is nowhere implemented!)

Text in cells is truncated with “…” if it doesn’t fit the cell.

  • Xojo LB
  • StyleGrid

Speed

  • Xojo LB
  • StyleGrid

Text Rendering

  • Xojo LB
  • StyleGrid (text is rendered slightly thinner/pixelated than in any other app)

Listbox1.ColumnAlignment(1)=ListBox.AlignDecimal

  • Xojo LB: love that decimal alignment! Looks so clean.
  • StyleGrid: no decimal alignment, and even right aligment is not possible (buggy).

@Beatrix:
I have asked Björn about 1 1/2 years ago about Retina, and he wrote it would come in 2013. Obviously he was working last year on many of his other products, which he made Retina compatible (i.e. TreeView, which I love).
StyleGrid is maybe low priority, or maybe in light of the Xojo LB improvements even dead. I will write Björn another email…

I don’t know why you say that… You have absolute control using cellbackgroundpaint in the Xojo listbox of the selected and non selected color. I do it all the time!

You can do it yourself in code with the xojo list box (and I assume StyleGrid)

  • Karen

Same here, although in my app it is just a single cell, not a multi-cell selection.

And I was able to use a class Dave S posted on the RS Forum to simulate headers which gave me more control of them (thanks, Dave!).

I never noticed, I’ll have to take a look.

Karen – I mentioned this above, do you see the problem with the Checkbox in feedback #17185?

I’ll Check… I thought that problem went away with cocoa

  • Karen

It may have, but I can’t build with Cocoa now, because of problems with the StyleGrid under Cocoa. Uggh. Ideally I’d like to build with nothing but controls included with Xojo, but that brings its own set of problems. Ever built an app with the stock TabPanel control on Windows? I’ve seen pinball machines that flickered less than that control.

Just tried it cocoa… No issue there with listbox checkboxes… Stylegrid needs to be updates it seems!

I’ve not made major use of tabPannels on Windows

[quote=74821:@Karen Atkocius]I don’t know why you say that… You have absolute control using cellbackgroundpaint in the Xojo listbox of the selected and non selected color. I do it all the time!
[/quote]
It’s obvious that I miss the obvious. How do you do that? No matter what I paint, the OS selection color is there.

Maybe, or maybe not. :wink: It will take me several days I’m sure (I’m not fluent with the graphics stuff & drag stuff). And the end result may be still weak, may flicker on Windows. I think it should be just build in.

My thoughts to create this on myself are roughly this:
On DragEnter shoot a picture1 of the column. Make it half transparent.
Create another picture2, just grey and lay it over the listbox column which is moved.
Move picture1 along with the mouse cursor movement.
On drop, re-create the whole listbox.

That would mimic Numbers’/iTunes’ column drag behavior.
Sounds that like a good idea, or is there a better route?

…and the ListBox under Carbon.