Thanks, Pantcho and yoxola
I haven't had as much time as I'd like to work on features but still found time to do quite a bit of updating.
Resizing columns and rows is in. Multiple selections are in. Keyboard movement is mostly in. You can use the arrow keys as well as page up, page down, home and end and they should work almost exactly like Excel. For example, holding down the control key while pressing the home key should clear any existing selections and set the cell at row 1 column 1 to the only selected cell. The logic between monitoring when the grid has or loses focus is also in place. It should work much better than the old release (original PB4 version) and be much more lenient. Clicking the system menu does not cause the selected grid to lose focus, for instance. The focused grid should only lose focus when another control gains focus.
I also completely revamped the part of the code that calculates cells dimensions to be faster and smaller. It's an often called procedure so it was important to get it down a little more. The keyboard movement keys should behave much more like Excel in this version (compared to the original PB4 release). So holding down the shift key while pushing the up or down arrow should increase or decrease the selection based on where the user first clicked.
It may not seem like much but it is. You'll just have to trust me
I've enabled a couple of things for this demo. I've set the number of rows to 120000 and added 10 sheets. The number of rows, columns and sheets are something you designate when you first create the spreadsheet gadget. I'm simply calling this to create the whole spreadsheet gadget...
Code: Select all
SpreadsheetGadget(#GridMain, 0, 21, WindowWidth(#WindowMain) - 1, WindowHeight(#WindowMain) - 21 - 20 - 1, 120000, 200, 10)
... and that's it. There is no code needed to remove the control at the end of the program like the old program.
You can click the test button to set the text for a particular cell. This part is in it's infancy so don't be too surprised if it doesn't seem that spectacular. Clicking the button will prompt for the row and column and then will use whatever sheet you have selected.
And the program is currently only 82k.
I'll be adding in cell editing capabilities next and going from there to working on handling formulas.
One thing I'd like to add that there will probably be scripting available in the future

Kind of like VBA for Excel. Long term goal but it's something I have planned.
Download...
http://www.seijin.net/Storage/xGrid-Test2.zip