EsGRID grid gadget 2.1. Don't post here!

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: EsGRID grid gadget 2.0.1. (Compiles with PB 32 and PB 64)

Post by srod »

Well, if the gey strip is appearing then that means everything is okay. If it is not appearing then please let me know.

Now, if you don't like that strip and would prefer that I removed it (or changed it's color) then I guess I can do that. Just let me know.
I may look like a mule, but I'm not a complete ass.
User avatar
HeX0R
Addict
Addict
Posts: 1189
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: EsGRID grid gadget 2.0.1. (Compiles with PB 32 and PB 64)

Post by HeX0R »

Yes, removing this strip would be perfect for my needs!
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: EsGRID grid gadget 2.0.1. (Compiles with PB 32 and PB 64)

Post by srod »

Done.

Rather than me upload an update just for this minor alteration, I'd ask that you make the modification yourself. Simply replace the #WM_DRAWITEM handler for the following :

Code: Select all

    Case #WM_DRAWITEM 
      *DrawItem = lParam
      If *DrawItem\hwndItem = GadgetID(*pointer\comboboxid)
        ;Proceed with the draw.
          SetTextAlign_(*DrawItem\hDC, #TA_LEFT)
          SetBkMode_(*DrawItem\hDC, #TRANSPARENT) ; Text is rendered transparent 
          SetTextColor_(*DrawItem\hDC, 0) 
          If *DrawItem\ItemState & #ODS_COMBOBOXEDIT	=0
            If *DrawItem\ItemState & (#ODS_FOCUS | #ODS_SELECTED) 
              Brush = CreateSolidBrush_(GetSysColor_(#COLOR_HIGHLIGHT)) 
              FillRect_(*DrawItem\hDC, *DrawItem\rcItem, Brush) 
              DeleteObject_(Brush) 
              SetTextColor_(*DrawItem\hDC, GetSysColor_(#COLOR_HIGHLIGHTTEXT)) 
            Else
              FillRect_(*DrawItem\hDC, *DrawItem\rcItem, GetStockObject_(#WHITE_BRUSH)) 
            EndIf 
            If *DrawItem\itemID <> -1
              *DrawItem\rcItem\left = 4
              text$=GetGadgetItemText(*pointer\comboboxid, *DrawItem\itemID)
              cellinfo\font = SendMessage_(*pointer\Handle, #WM_GETFONT, 0, 0)
              ;Check if the egrid has an associated CellCallBack function.
              cellinfo\row = *pointer\item : cellinfo\column = *pointer\subitem-1
              returnfromcallback = DespatchCellCallback(*pointer, #egrid_FormatCell, @cellinfo)
              oldfont = SelectObject_(*DrawItem\hDC, cellinfo\font)
              DrawText_(*DrawItem\hDC, text$, Len(text$), *DrawItem\rcItem, #DT_END_ELLIPSIS|#DT_NOPREFIX|#DT_SINGLELINE|#DT_VCENTER)
              SelectObject_(*DrawItem\hDC, oldfont)
            EndIf 
          EndIf
      EndIf
Rather than just remove the strip outright, I may make it optional though because I kind of like it. :)
I may look like a mule, but I'm not a complete ass.
User avatar
HeX0R
Addict
Addict
Posts: 1189
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: EsGRID grid gadget 2.0.1. (Compiles with PB 32 and PB 64)

Post by HeX0R »

Thanks a lot, works perfect now (at least for me :mrgreen:)!

[Edit]
Now, after i know the part in the source (i searched all day, but i were lost in all of these heavy api-usages), i started to play with it.
What about making the size of the strip configurable? If Size = 0 then disable it.
Cause, for my needs, those 15 pixels are just too wide and i think about switching it to 10 pixels instead of hiding it totally.
...not sure yet...
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: EsGRID grid gadget 2.0.1. (Compiles with PB 32 and PB 64)

Post by srod »

Yes I'll do something like that for the next update. :)
I may look like a mule, but I'm not a complete ass.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: EsGRID grid gadget 2.0.1. (Compiles with PB 32 and PB 6

Post by srod »

3rd Apr 2010.

Compatibility release.

The newly released beta version of Purebasic (4.5) required some heavy-duty changes to EsGRID (which of course affects ExGRID).

If using Purebasic 4.4 or 4.5 then please download the new versions of EsGRID and ExGRID. No changes have been made other than to make the grids compatible with Purebasic 4.5.

Stephen.
I may look like a mule, but I'm not a complete ass.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: EsGRID grid gadget 2.0.1. (Compiles with PB 32 and PB 6

Post by srod »

29th Apr 2010.

EsGRID 2.0.2 (and ExGRID 1.1) is a bug fix release.

A bug in EsGRID (mousewheel scrolling) has been fixed. This bug would only manifest itself in ExGRID programs! Thanks to Kiffi for reporting the bug.

Stephen.
I may look like a mule, but I'm not a complete ass.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: EsGRID grid gadget 2.0.4. (Compiles with PB 32 and PB 6

Post by srod »

17th Jun 2010.

EsGRID 2.0.4 is a bug-fix release.

A couple of bugs have been fixed. Version 2.0.3 (which I forgot to upload.... doh!!!) fixed a rendering bug which all but destroyed the nxPropertyBox control and version 2.0.4 fixes a bug with the #egrid_RegainFocus notification (my thanks to Luis).

Stephen.
I may look like a mule, but I'm not a complete ass.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: EsGRID grid gadget 2.0.5. (Compiles with PB 32 and PB 6

Post by srod »

29th July 2010.

EsGRID 2.0.5 - Purebasic 4.4/4.5 versions.

The use of egrid_SetCellText() now clears the internal 'cell modified' flag if used on the currently selected cell (that being edited). This means that the egrid_SetCellText() function, if used on the currently selected cell (that being edited), will no longer cause an #egrid_CellUpdated notification to be sent when the user finishes editing the cell (unless further modifications are made of course).

This change has been forced upon me because this led to a major bug when applying the nxPropertyBox control (built atop EsGRID) to a situation involving altering the properties of multiple controls.

The ExGRID download includes the new version of EsGRID.

Regards.

Stephen.
I may look like a mule, but I'm not a complete ass.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: EsGRID grid gadget 2.0.6. (Compiles with PB 32 and PB 6

Post by srod »

11th Sep 2010.

EsGRID 2.0.6 - Purebasic 4.4/4.5 versions.

Bug fixed. Edit a cell and switch apps via ALT-TAB. Continue hitting ALT-TAB until you return to your grid. Hit tab... crash!

The ExGRID download includes the new version of EsGRID.

Regards.

Stephen.
I may look like a mule, but I'm not a complete ass.
X
Enthusiast
Enthusiast
Posts: 311
Joined: Tue Apr 04, 2006 6:27 am

Re: EsGRID grid gadget 2.0.6. (Compiles with PB 32 and PB 6

Post by X »

Hello, I purchased eGrid back in 2006. Is there a upgrade price or whatever to the newest version? I want to be able to have the newest version (32bit,64bit) to work with the custom controls.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: EsGRID grid gadget 2.0.6. (Compiles with PB 32 and PB 6

Post by srod »

Hi,

there is only a small upgrade price if you wish to upgrade to ExGRID. If you are happy with EsGRID then your original purchase comes with lifetime updates and you have nothing more to pay. EsGRID is all you need for the nxPropertyBox control (assuming this is what you mean by 'custom controls' ?)

I lost all records from 2006 following a hard-drive failure and so you will need to e-mail me the original reg codes which I would have provided for you so that I can confirm your purchase.

Please contact me through the nxSoftware site.

Stephen.
I may look like a mule, but I'm not a complete ass.
X
Enthusiast
Enthusiast
Posts: 311
Joined: Tue Apr 04, 2006 6:27 am

Re: EsGRID grid gadget 2.0.6. (Compiles with PB 32 and PB 6

Post by X »

nxProperty box, i think is what I mean :) ty, I'll reply(forward) the code email to you, thanks again!
Marco2007
Enthusiast
Enthusiast
Posts: 648
Joined: Tue Jun 12, 2007 10:30 am
Location: not there...

Re: EsGRID grid gadget 2.0.6. (Compiles with PB 32 and PB 6

Post by Marco2007 »

Damn, Stephen is gone. :-(

Has anyone any idea, how to highlight text from a cell, when jumping from Cell to Cell with Return or Tab?

That`s what Stephen wrote:
Yes you can easily do something like that with a cell callback function and some strategically placed redrawing commands.

I have no idea ...
Last edited by Marco2007 on Fri Apr 26, 2019 7:39 pm, edited 1 time in total.
PureBasic for Windows
X
Enthusiast
Enthusiast
Posts: 311
Joined: Tue Apr 04, 2006 6:27 am

Re: EsGRID grid gadget 2.0.6. (Compiles with PB 32 and PB 6

Post by X »

If I recalled correctly, he is only gone from the forums ... still answer emails?
Post Reply