I’m getting a new version of dataview ready for release. If anyone is interested, please download the demo. It’s a bigger download(40.5M) because I’ve included a couple of database files for testing. Please let me know if you find any bugs/glitches. Keep in mind that some features really shouldn’t be combined (zooming&popupmenus for instance)…
Sort of. It can use NSScrollers under Cocoa, and it can replace a listbox, but it is essentially a listview backed by a DataSource class that can be subclassed to override different accessors and create an on-demand list, pre-populated, or dynamic list if you like. The default DataSource uses dictionaries to store values for fast access, fast sorting and low memory usage.
Rendering is done on-demand. The embedded controls are actually cached renderings created by the OS (aside from the Linux popup arrow) so your app looks native on any version of any platform. (cached renderings also make for great performance ,aside from Linux progressbars where rendering cannot happen until after the display needs to happen - still working on that)
The cells are stored as variants and sorted based on the actual values - string, double, date (totalseconds) etc.
It is built on top of piDogScrollingCanvas for natural scrolling and zooming (with pinch gestures on MacOS)
I’ve added lots of modern eye-candy (animated drag-reorder and folder expand/collapse)
But it is mostly useable as a drop-in replacement for a listbox.
[quote=169820:@Ashot Khachatryan]Is it possible to disable the eyecandy?
[/quote]
I can add that. I was thinking that would likely be a request.
[quote=169824:@Markus Winter]How do you use a dictionary for sorting???
[/quote]
I keep an integer array of indexes (representing the rows) to access values in the dictionaries (representing the cells). Then when sorting, build an array of the values in the sorted column (using redim(), NOT append) and use sortwith to sort the index array. It’s very fast.
[quote=169825:@Alain Bailleul]On windows, when I click on a row, all text disappears
[/quote]
Odd… I’m looking at it now. Looks like the listHighlightColor and ListHighlightTextColor are too similar. Check the UsesSystemColors box or change the listHighlightColor to something darker.
[quote=169824:@Markus Winter]How do you use a dictionary for sorting???
[/quote]
I should add that you can subclass the datasource method and implement the sortByColumn method to use your own custom sorting routines. The sort is followed by a subSort that sorts duplicate rows by their Row ID to prevent random ordering of duplicate (or empty) cells.