Hi Michel. Yes, that is what I have at the moment but the listbox can only do so much and I need to be able to do things that it can’t handle, like hide/show rows by maybe setting an individual row height to 0 etc.
If you uncouple data and display, hiding a row becomes rather easy. especially since the ListBox does not have smooth scrolling, so addressing rows is rather straightforward.
Of course if you are in to have variable height rows altogether, you might as well brew your own.
Showing and hiding rows in the Xojo Listbox would not hard, after all that is basically how it handles hierarchical listboxes, as Michel said it;s a matter of how you handle your data storage.
It can’t do variable infinitely row height but I did write a subclass that allows merging cells, so rows can be multiples of the base row height.
Writing your own listbox may seem not too difficult at first glance … and for a very limited set of specific features it’s not… BUT writing a general purpose one that approaches the feature richness of the Xojo listbox is FAR from trivial.
With some ingenuity the Xojo listbox can be made to do a lot, with a lot less work then writing your own.
Data storage: depends on how much data you have. An array would be the most simple solution. A database if you got lots and lots of data.
Undo: there are a couple of undo systems around (for instance http://www.pidog.com/TheBigUndo/). Undo basically contains a stack of things you have done. Each part of the stack also knows what do do for undo. When an undo is done you pop the stack.