egrid 4 is a complete and utter total rewrite (as I think the screenshot suggests!)
It is not compatible with earlier versions, such are the nature and scope of the changes. So any code running with an egrid version 3 will need altering before using an egrid version 4.
It is simply not comparable. See the 'history.txt' file for a list of some of the changes, e.g. extra celltypes, customised headers, better scrolling, far more 'hot keys' used etc.
I'm releasing in beta form because even though a few kind souls have been testing this out, there inevitably remain some bugs to fish out and feed to the cat. The best way is to thus release a version and let the assembled masses rip the library to shreds!
There's no manual at the moment, but a .chm help file will follow.
It's difficult to list out the features as they are now quite numerous. Indeed I've only enclosed two examples, which are not really enough to get to grips with some of the features.
Perhaps a list of user functions will help:
- egrid_AddColumn(gadgetnum, column, text.s, width)
- egrid_AddRow(gadgetnum, row)
- egrid_AppendCells(gadgetnum, column)
- egrid_CopyCells(gadgetnum, column, row, xcols, yrows)
- egrid_CreateGrid(gadgetnum, x, y, width, height, rowheight, styleflags, furtherstyles)
- egrid_CreateCellCallback(gadgetnum, Address)
- egrid_GetCellText(gadgetnum, column, row)
- egrid_GetColumnOrderArray(gadgetnum, *memorybuffer)
- egrid_HideGrid(gadgetnum, state)
- egrid_MakeCellVisible(gadgetnum, column, row)
- egrid_RemoveColumn(gadgetnum, column)
- egrid_RemoveRow(gadgetnum, row)
- egrid_Resize(gadgetnum, x, y, width, height)
- egrid_SelectCell(gadgetnum, column, row, editingcell.b)
- egrid_SetCellText(gadgetnum, column, row, text.s)
- egrid_SetColumnOrderArray(gadgetnum, *arrayindexes)
- egrid_SetHeaderFont(gadgetnum, font)
- egrid_SetHeaderHeight(gadgetnum, height)
- egrid_SetOptions(gadgetnum, headerbordercolour, selectionbordercolour, selectionborderwidth)
I'm not releasing the source for this library as yet (and am undecided on that score), but I have enclosed a copy of the source for the resident file so you can see all constants that you might need to use etc.
Again I'll give full details within the forthcoming .chm help manual.
One thing to note is that you should NOT use any of the Purebasic gadget commands with an egrid version 4. For example, do not use AddGadgetColumn() etc. Use the commands above instead. Use of the native PB gadget commands on a version 4 egrid will, at best, crash the program, at worst, send you off to PC World to buy a new hard drive!
Another thing for those used to using earlier versions; columns are now indexed from 0 to egrid_NumberOfColumns() - 1. This brings it into line with the row indexes.
Anyhow, enjoy; a lot of work has gone into this one and I reckon I've now taken a ListIcon based grid control as far as I can.
At least until version 5...