Look&Feel: piDog DataView vs Xojo Listbox

Hello @jim mckay :slight_smile:
You asked us to tell you if we miss a feature the Xojo Listbox is offering but DataView does not.

But what annoys me the most is that if I replace the Stock Xojo Listbox with a piDog DataView, the look and feel is totally different compared to a Stock Xojo Listbox. I really would like to replace the Xojo Listbox even in my biggest projects But the look and feel of the DataView without me manually setting each property of the DataView, is too much work. :wink:

you can really do a lot of things subclassing the xojo listbox.
the only thing you can’t do (I’m aware of) is having variable row heights.
for that you need to subclass a canvas and it’s much much more work.

I could also subclass the piDog DataView and change all properties to make it look like a Stock Xojo Listbox, but i would really prefer the DataView to behave and look like a Stock Xojo Listbox and tune in only the changes i need. :slight_smile:

Funny, I was playing around with DataView the other day and came to the exact same conclusion. It’s not a drop-in replacement because it doesn’t look like the Xojo listbox and that, in my opinion, limits its usefulness.[quote=421838:@Jean-Yves Pochez]you can really do a lot of things subclassing the xojo listbox.
the only thing you can’t do (I’m aware of) is having variable row heights.
[/quote]
DataView is data on demand and allows you to have all sorts of embedded controls. In one of my projects I’m going to replace some old StyleGrid controls and it has the variable row height and some other features that were nice with StyleGrid.

But otherwise I agree the the Xojo listbox is very powerful with a little work. I still wish we had a true grid control that allowed embedding of controls/containers. The IOSTableCell is pretty close to what I want but I have no idea how much work that is to get it cross-platform on the desktop.

I made a data-on-demand listbox subclass ( in a containercontrol for the scrollbars) connecting to local or remote db.
I can also embed checkboxes, popups or pictures in the same listbox (and almost anything I need the principle stays the same I will program it if I need it)

[quote=421868:@Jean-Yves Pochez]I made a data-on-demand listbox subclass ( in a containercontrol for the scrollbars) connecting to local or remote db.
I can also embed checkboxes, popups or pictures in the same listbox (and almost anything I need the principle stays the same I will program it if I need it)[/quote]

can you show us what you have done… maybe a screenshot


[quote=421836:@Sascha S]You asked us to tell you if we miss a feature the Xojo Listbox is offering but DataView does not.
[/quote]

Thanks for catching that! I’ve added it for the next update.

I’m working on creating a set of subclasses for specific looks.

I’m working on:
FileBrowser (Finder/Explorer)
Sidebar
Xojo ListBox (I may just make this the default setup)
(Any others that would be useful?)

Here’s the finder look in Mojave so far


I still need to incorporate native disclosure and use the correct NSColors for the text and other minor adjustments, then on to testing on other OS versions.

[quote=421838:@Jean-Yves Pochez]you can really do a lot of things subclassing the xojo listbox.
the only thing you can’t do (I’m aware of) is having variable row heights.
for that you need to subclass a canvas and it’s much much more work.[/quote]

There are many things in piDog that I have taken advantage of that may be possible with subclass, but piDog saves me the bother. Others like variable row height and high column counts are not even feasible.

Off the top of my head:

  • Variable row heights
  • Column count is limitless (not 64)
  • Span cells vertically
  • Span cells horizontally
  • Lock column(s) on the left side to act like row headings
  • Embed container controls in cells, making limitless possibilities
  • LOTS more events exposed, including header paint events etc
  • Several additional methods to control column width
  • User draggable column reorder
  • Code can refer to columns in original order; even if user moves them around
  • Save/restore via XML making it easy to retain state and user changes
  • Row drags are visual contents of row, not black placement bar, which IMHO is smoother UI
  • Both rows and columns have visible property without needing to set size to 0
  • Data on demand is very easy (though Kem’s DOD class is also very good at this)
  • Very flexible drag and drop support – Jim’s added several things at my request

There’s undoubtably plenty more, but those are features that I have used. Could I do some of those via Listbox subclass? Sure, but for the price there is no way my time is worth it. I do license the source version, and in a very few specific cases modify the source to tweak for my needs. But in some cases where I have mentioned what I changed for my own purposes, Jim just exposed as new options in a future version. He’s very responsive.

I really love DataView in MacOS apps for its customizable look, re-orderable columns and so forth, but each time I’ve tried it under Windows it’s failed miserably - it bogs down in the simplest of operations like horizontal scrolling. I’m not really doing anything fancy, just loading up the list and presenting it. Also as I recall (it’s been a few months) there are some inconsistencies with the Xojo listbox conventions that make it not a perfect drop-in replacement, and I had to do a bunch of manual changes.

OTOH, if Xojo would update its ancient ListBox with some customizable header formatting, I wouldn’t really be looking for an alternative at all.

Also I should add that Jim’s responsiveness and support have been fantastic.

1 Like

I have not updated my listbox subclass for Dark Mode. I have had one request for that, but I have been very busy with my day job and I have not installed Mojave so have not dealt with Dark Mode at all…

Would there be interest in such an update?

  • karen

+1

[@Bob Keeney I agree the the Xojo listbox is very powerful with a little work. I still wish we had a true grid control that allowed embedding of controls/containers.]

+1

Compared to macOS TableView both the Xojo listbox and the piDog Dataview are much slower. My main problem with DataView was changing the column widths. When data was loaded this just didn’t work. With SQLite everything was fine. With Valentina changing the column widths was so slow.

I would never expect when using a new component that it is a drop-in replacement. Especially with something as complex as a listbox.

It is advertized as such, that’s why i expect it to work like a drop-in replacement:

like

I am thinking this is due to the rerendering of the cells at the new width for each frame. With internal data, it’s immediate, but if the datasource is an on-demand database, the rendering requires a new query for each frame and that’s going to have a noticeable lag. I could add a temporary cache for values currently displayed and that would eliminated any lag.

[quote=421938:@Sascha S]It is advertized as such, that’s why i expect it to work like a drop-in replacement:

It is an easy to use, drop-in replacement for Xojo’s Listbox control[/quote]

I was thinking in terms of API drop-in, but I definitely see your point.

I’ve update DataView to 1.14.0 and included a couple of subclasses Including a ListBox style one. (more to come)

Other OS’s here

Also did a bunch of work to improve column/window resizing and added a property - UseTempDataSourceForColumnResize to cache visible cells during resize operations.

Try the current version here if you like.

@jim mckay , On Windows the fonts are not crisper like the Xojo Litbox. It looks dull. I tried to change the font and it won’t change it for popup and dates and checkbox. Can you correct it.

I’ll get the font rendering fixed up.

The popup, date and checkbox fonts can be changed if the ControlCellsUseSystemFont property is set to false. There isn’t a switch for it in the demo window currently though. I’ll add that.

Ok, 1.14.0.1 is up and should deal with both.