Page 1 of 25

egrid 4 grid gadget - (static PB library version.)

Posted: Mon Sep 18, 2006 11:31 pm
by srod
Image

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_ClearRows(gadgetnum)
  • egrid_CopyCells(gadgetnum, column, row, xcols, yrows)
  • egrid_CreateGrid(gadgetnum, x, y, width, height, rowheight, styleflags, furtherstyles)
  • egrid_CreateCellCallback(gadgetnum, Address)
  • egrid_FreeGrid(gadgetnum)
  • egrid_GetCellText(gadgetnum, column, row)
  • egrid_GetColumnOrderArray(gadgetnum, *memorybuffer)
  • egrid_Height(gadgetnum)
  • egrid_HideEdit(gadgetnum)
  • egrid_HideGrid(gadgetnum, state)
  • egrid_MakeCellVisible(gadgetnum, column, row)
  • egrid_NumberOfColumns(gadgetnum)
  • egrid_NumberOfRows(gadgetnum)
  • egrid_PasteCells(gadgetnum)
  • egrid_RemoveCellCallback(gadgetnum)
  • egrid_RemoveColumn(gadgetnum, column)
  • egrid_RemoveRow(gadgetnum, row)
  • egrid_Resize(gadgetnum, x, y, width, height)
  • egrid_SelectCell(gadgetnum, column, row, editingcell.b)
  • egrid_SelectedColumn(gadgetnum)
  • egrid_SelectedRow(gadgetnum)
  • 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)
  • egrid_Width(gadgetnum)
  • egrid_x(gadgetnum)
  • egrid_y(gadgetnum)
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...

:)

http://www.purecoder.net/egrid.htm

Posted: Tue Sep 19, 2006 12:16 am
by MrMat
That's a fantastic grid! Congrats!

Posted: Tue Sep 19, 2006 12:26 am
by srod
Thanks Mat, aka egrid bug spotter numero uno! :)

Thanks for all the help, it's been much appreciated.

Posted: Tue Sep 19, 2006 12:31 am
by White Eagle
This is simply amazing!

Posted: Tue Sep 19, 2006 12:34 am
by srod
White Eagle wrote:This is simply amazing!
I'm not one for disagreeing! :lol:

Thanks. I hope it's useful.

Posted: Tue Sep 19, 2006 12:39 am
by jack
you should think about making it a commercial product. :)

Posted: Tue Sep 19, 2006 12:45 am
by srod
jack wrote:you should think about making it a commercial product. :)
I'm certainly thinking along those lines; but not so much for the PB community, because I take out as much as I put in.

A dll version of egrid 4 will follow at some point and then of course I can offer it to developers in other languages as a cheap, but what I hope is a very versatile grid etc. We'll see.

Posted: Tue Sep 19, 2006 2:12 am
by White Eagle
* Warning * Implementing egrid into your program is extremely addictive.

Posted: Tue Sep 19, 2006 7:21 am
by Dare
White Eagle wrote:* Warning * Implementing egrid into your program is extremely addictive.
:lol:

Sounds awesome, srod. Going to play with it this weekend.

Posted: Tue Sep 19, 2006 9:55 am
by Inf0Byt3
You just saved my day Srod. Many many thanks for this unbelievable work!

Posted: Tue Sep 19, 2006 10:03 am
by srod
Hi,

thanks.

Don't use any #egrid_PBImage type cells at the moment because I'm going to alter the way these operate in order for developers in other languages to be able to use egrid 4. Basically I will switch image# for imageID's and introduce a new celltype of #egrid_Icon.

A bit busy at the moment, but I should get round to it this evening.

:)

Posted: Tue Sep 19, 2006 11:13 am
by gnozal
Very impressive, thanks !

Posted: Tue Sep 19, 2006 11:29 am
by zikitrake
:shock: Great! :shock:

Posted: Tue Sep 19, 2006 2:21 pm
by Psychophanta
Very nice, go on please! :D

Posted: Tue Sep 19, 2006 8:03 pm
by White Eagle
*bump* :roll: