I'll be interested to answer any questions regarding development for anyone else who may want to build something similar.
So far I've build it to be a completely transparent PB gadget by returning a container gadget ID. This ID can be passed to the list view functions which know how to work with all of the other gadgets contained inside, specifically an image gadget and two scrollbars.
The gadget supports an infinite number of instances by using a doubly-linked global structure. Each new ID is a copy of the same structure in the list. All of the instanced structures use a similar method of linking data. Each column is a list which points to a list of rows.
An example of this can be found here:
http://www.purebasic.fr/english/viewtopic.php?t=34139
So, after implementing scrollbars I needed to know the exact width and height of the visible content in pixels. I know when the scrollbars should be visible by whether the columns or rows are 'overdrawn' past the visible area. But since I don't want to continue drawing I don't know what the limit is beyond the visible area and therefore can't provide the scrollbars with an upper limit.
I can do this vertically by finding the sum of the height of each cell but this would require me to scan each column individually. To find the width I would them need to scan the entire table n*n times because I only link each cell vertically. This is a poor solution.
I've been re-working the code and cell structures to support stepping through each cell vertically as well horizontally. Each column and row will also cache the width and height of the table in pixels on-insert. This should solve this problem and lead into being able to identify which cell the mouse cursor is in vertically (I can already do it horizontally) for the column resizing code.
The way I handle updating the horizontal cell pointers is by walking the cells horizontally three cells (one left and one right of the new row) and then vertically until all of the cells relevant cells are updated.
I am using linked lists for everything, because it makes sense to me. Can anyone provide guidance on optimizations and things to be aware of during development? I can easily say that I was not expecting this one gadget to be so complicated to write. It's been a real trip.
To be specific about why I am even creating a custom list gadget: the list view provided through the Win32 API is not flexible enough to satisfy the needs of this project and has several limitations when it comes to customizability (the client wants a specific look) and it has several caveats when it comes to displaying text with images.
Since I studied the Win32 list view prior to this, as my first solution, I've found a few of the concepts to be very attractive which I am implementing in my own gadget, like various callbacks and image lists. There are a lot of good things about Win32's list view but there is also a lot of baggage.

