EsGRID grid gadget 2.1. Don't post here!
Update. EsGRID version 1.1 - 12th Nov 2007.
Version 1.1 of EsGRID (please ignore the previous indexing which related to egrid and not EsGRID) is quite a large update.
Fixed a few few minor bugs and added some subtle refinements to things like grid alignment etc. The major changes come with button type cells and combo box (not editable combo boxes) type cells.
Changes to cells of type #egrid_Button :
There are now two styles of command button; 'standard' and 'flat'. This is communicated through a CellCallback function. You can also now alter the button dimensions. That is the buttons no longer have to fill the entire cell etc.
Changes to cells of type #egrid_ComboBox :
With the 'traditional' combo boxes, a row height setting for the EsGRID which is too narrow for the underlying font can cause the combo box controls to overlap neighbouring cells.
By setting the egrid creation flag #egrid_NoComboBoxOutlines (this is a 'further styles' flag) all combo box type cells will not display the main outline of the combo box control, but will instead display only the downward scroll button. Furthermore this button will be sized so that it DOES NOT overlap neighbouring cells no matter how narrow the row heights etc.
Very useful for grids with very narrow rows.
See the user guide for further details.
Version 1.1 of EsGRID (please ignore the previous indexing which related to egrid and not EsGRID) is quite a large update.
Fixed a few few minor bugs and added some subtle refinements to things like grid alignment etc. The major changes come with button type cells and combo box (not editable combo boxes) type cells.
Changes to cells of type #egrid_Button :
There are now two styles of command button; 'standard' and 'flat'. This is communicated through a CellCallback function. You can also now alter the button dimensions. That is the buttons no longer have to fill the entire cell etc.
Changes to cells of type #egrid_ComboBox :
With the 'traditional' combo boxes, a row height setting for the EsGRID which is too narrow for the underlying font can cause the combo box controls to overlap neighbouring cells.
By setting the egrid creation flag #egrid_NoComboBoxOutlines (this is a 'further styles' flag) all combo box type cells will not display the main outline of the combo box control, but will instead display only the downward scroll button. Furthermore this button will be sized so that it DOES NOT overlap neighbouring cells no matter how narrow the row heights etc.
Very useful for grids with very narrow rows.
See the user guide for further details.
Last edited by srod on Mon Nov 12, 2007 4:40 pm, edited 1 time in total.
I may look like a mule, but I'm not a complete ass.
- Thorsten1867
- Addict
- Posts: 1372
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
*** fixed ***srod wrote:**EDIT : please take care with the install whilst I bully Thorsten into making an alteration to EasySETUP!Make sure you point the setup program to your PB installation folder when installing.
Translated with http://www.DeepL.com/Translator
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Update. EsGRID version 1.2.
Hot on the heels of the 1.1 release, comes version 1.2 !
This version adds a new type of cell, namely a custom cell.
Such cells are the responsibility of the host application to paint etc. Basically, when such cells are about to be rendered by the EsGRID library, a message (egrid_PaintCustomCell) is sent to the CellCallback function (if defined). Here, the host application is asked to paint 'off screen' to an image which is passed by the EsGRID library to the CellCallback function. The image is sized exactly to fit the cell being painted and has also been 'filled' with the background colour specified by the egrid_FormatCell message (which may involve a gradient fill of course).
The host application can of course choose not to perform any painting, in which case just the background image is displayed within the underlying cell.
Such cells are of course 'static' in that the user cannot readily edit them (although this can be gotten around with some 'creative' programming on the part of the developer!
)
NOTES.
egrid forum: http://egrid.aceboard.com/
egrid website: http://www.purecoder.net/esgrid.htm
**EDIT - a simple example of using custom cells. Static library version of EsGRID for PB 4.1 only.
Hot on the heels of the 1.1 release, comes version 1.2 !
This version adds a new type of cell, namely a custom cell.
Such cells are the responsibility of the host application to paint etc. Basically, when such cells are about to be rendered by the EsGRID library, a message (egrid_PaintCustomCell) is sent to the CellCallback function (if defined). Here, the host application is asked to paint 'off screen' to an image which is passed by the EsGRID library to the CellCallback function. The image is sized exactly to fit the cell being painted and has also been 'filled' with the background colour specified by the egrid_FormatCell message (which may involve a gradient fill of course).
The host application can of course choose not to perform any painting, in which case just the background image is displayed within the underlying cell.
Such cells are of course 'static' in that the user cannot readily edit them (although this can be gotten around with some 'creative' programming on the part of the developer!

NOTES.
- If you are thinking that these new custom type cells are equivalent to cells of type egrid_Bitmap, then rest assure -they are not! For example, an application utilising an EsGRID using 1000 cells of type egrid_Bitmap would require storage for up to 1000 bitmaps. On the other hand, the same application using 1000 custom cells would require storage for precisely 0 bitmaps as they remain the sole responsibility of the EsGRID library which destroys them immediately after rendering individual cells!
- With regard to these custom cells. the dll versions of the EsGRID library operates slightly differently than the Purebasic static library version in that the dll versions will pass the bitmap handle of the 'off screen' image whilst the static library version will pass the Purebasic image# etc. This means that users of the static library version can use the full range of the Purebasic image library commands when painting to the off-screen image (such as StartDrawing() etc.)
egrid forum: http://egrid.aceboard.com/
egrid website: http://www.purecoder.net/esgrid.htm
**EDIT - a simple example of using custom cells. Static library version of EsGRID for PB 4.1 only.
Code: Select all
;******************************************************************************************
;'EsGRID' editable grid control. By Stephen Rodriguez.
;******************************************************************************************
;************************************CELLCALLBACK FUNCTION*********************************
;NOTE, THIS IS NOT A PROPER WINDOWS CALLBACK!
Procedure.l MyCellCallBack(egrid, uMsg, *cellinfo.egridCellInfo)
Protected result, width, height
Select uMsg
Case #egrid_NotifyCellType
If *cellinfo\column = 0
*cellinfo\celltype=#egrid_CustomCell
EndIf
Case #egrid_FormatCell
If *cellinfo\column = 0
; *cellinfo\backcolour = $CBCBCB
EndIf
Case #egrid_PaintCustomCell
;Let's do some custom painting in this cell.
;We simply place a box at the center of the cell.
StartDrawing(ImageOutput(*cellinfo\param))
Box(*cellinfo\width/2-10,*cellinfo\height/2-10, 20, 20, #Blue)
StopDrawing()
Default
result = #True; This accounts for all messages we have decided not to process.
EndSelect
ProcedureReturn result
EndProcedure
;******************************************************************************************
If OpenWindow(0,0,0,640,300,"EsGRID demo 9.",#PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget|#PB_Window_Maximize|#PB_Window_ScreenCentered) And CreateGadgetList(WindowID(0))
;Create an egrid with resizable columns.
egrid_CreateGrid(1, WindowWidth(0)/4, WindowHeight(0)/8, WindowWidth(0)/2, WindowHeight(0)/2,48,#egrid_GridLines|#egrid_HeaderDragDrop|#egrid_AlwaysShowSelection, #egrid_ResizeColumnsTrue|#egrid_MultiLineText)
egrid_CreateCellCallback(1, @MyCellCallBack())
;Add columns and rows.
egrid_AddColumn(1,0,"CUSTOM CELLS",120)
For i = 1 To 10
egrid_AddColumn(1,-1,"",80) ;Some dummy columns.
Next
egrid_AddRows(1,-1, 20) ;20 rows.
;Set a few options.
egrid_SetHeaderHeight(1,40)
egrid_SetOption(1, #egrid_SelectionBorderWidth, 2)
Repeat
EventID = WaitWindowEvent()
Until EventID = #PB_Event_CloseWindow
EndIf
End
I may look like a mule, but I'm not a complete ass.
Self-employed you see!MrMat wrote:How do you find the time?!Excellent work!

Actually, all of the recent updates to EsGRID have been driven by my current work. Particularly the most obscure bug fixes imaginable! At least this way the whole library is getting a good 'road test' as I constantly ransack it and extend it etc.
I may look like a mule, but I'm not a complete ass.
Keep up the good work -- just registered a copy. I haven't actually tried it yet but plan to soon. Even the chance of it working is worth the price! 
Oh, and your forum is pretty broken :
Can't create a new thread (errno 11); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug

Oh, and your forum is pretty broken :
Can't create a new thread (errno 11); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Hi Karbon,
have just got in and haven't checked my e-mail as yet but I'll be right on your registration asap.
The forums are nothing to do with me - although I just checked the forums and it let me make a post okay!
There's another EsGRID update in the pipeline. Mainly a bugfix release, but a couple of more refinements have been included.
have just got in and haven't checked my e-mail as yet but I'll be right on your registration asap.
The forums are nothing to do with me - although I just checked the forums and it let me make a post okay!
There's another EsGRID update in the pipeline. Mainly a bugfix release, but a couple of more refinements have been included.

I may look like a mule, but I'm not a complete ass.