Page 15 of 23

Posted: Tue Sep 30, 2008 8:29 pm
by srod
EsGRID version 1.2.7 - 30 September 2008.
A couple of bugs related to ownerdrawn combo cells have been fixed.

http://www.nxsoftware.com

Egrid lite

Posted: Wed Oct 15, 2008 6:26 am
by fd
Hello,

With esgrid-lite, how can i get the text of a cell ? I am very stupid but i dont find a function to do it.

Thanks

Posted: Wed Oct 15, 2008 9:26 am
by srod
egrid_GetCellText()

Posted: Fri Oct 17, 2008 11:29 am
by Coolman
Is it possible to have the complete source code of esGrid-lite, I do not use the libs because it is difficult to maintain compatibility with different versions of PureBasic ...

however, congratulations for your excellent program ...

Posted: Fri Oct 17, 2008 12:19 pm
by srod
The complete source for EsGRID lite = the complete source for EsGRID itself with some conditional compilation thrown in to remove those parts not required for EsGRID lite.

At this point I think you will understand why I cannot give away the source for EsGRID lite. :)

Anyhow, EsGRID lite is not in the form of a PB user-library; it comes in the form of a dll and so cannot possibly be broken by updates to PB itself!!! I don't think you've looked very carefully at EsGRID lite! :wink:

I no longer create or rely on PB user-libraries for that very reason you cite. They are more hassle than hoff.

Posted: Fri Oct 17, 2008 2:17 pm
by Coolman
srod wrote:The complete source for EsGRID lite = the complete source for EsGRID itself with some conditional compilation thrown in to remove those parts not required for EsGRID lite.

At this point I think you will understand why I cannot give away the source for EsGRID lite. :)

Anyhow, EsGRID lite is not in the form of a PB user-library; it comes in the form of a dll and so cannot possibly be broken by updates to PB itself!!! I don't think you've looked very carefully at EsGRID lite! :wink:

I no longer create or rely on PB user-libraries for that very reason you cite. They are more hassle than hoff.
I understand, thank you for your answer, however I also make preferred not to deliver dlls with my programs whenever possible, congratulations on your job, good luck ...

8)

Posted: Mon Dec 15, 2008 12:29 pm
by srod
EsGRID version 1.3.0 - 15 December 2008.

Version 1.3.0 allows for custom tooltips to be added to individual cells (plus any unused portion of a grid). This is achieved through an additional creation 'further-style' flag (#egrid_RequestCellTooltips) and an accompanying CellCallback message (#egrid_GetCellTooltip).

Demo program 2 shows how to implement such tooltips and the user manual has been updated accordingly.

Posted: Wed Dec 17, 2008 12:07 pm
by srod
Doh - 2 days after releasing the new version and PB 4.3 final goes and breaks it! :)

I will upload a new version later on. DONE.

Posted: Sat Jan 03, 2009 2:46 pm
by srod
EsGRID version 1.3.1 - 3 January 2009.
Bug fix. EsGRID source code for Purebasic 4.3.
A bug causing crashes to result when grids were placed within Purebasic container gadgets has been fixed. This only effects the source code version for Purebasic 4.3. The version for Purebasic 4.2 does not suffer this bug.

http://www.nxsoftware.com

Posted: Tue Jan 13, 2009 8:31 pm
by srod
Hi,

just a quick note to those who have purchased an egrid/EsGRID license at any time in the past, -that purchase comes with free lifetime updates!

I point this out because a few 'early customers' now have made additional purchases, thinking that this is the only way to secure access to the EsGRID download section! I apologise if I have been less then clear on this, but existing customers simply need to send me an e-mail and I will happily create an individual account through which the EsGRID libraries can be accessed etc. No extra purchase is necessary! :)

Unless of course these additional purchases are in recognition of the standing genius who is the author of EsGRID! :wink:

Posted: Sat Jan 31, 2009 8:25 pm
by zikitrake
Hi, Srod, I'm your nightmare 8) .

A easy(?) question:

How can I put an 'animated' icon in a cell.

Currently I try with this code:

Code: Select all

Global ICOSTATUS_RED = ImageID(CatchImage(#PB_Any, ?ICOSTATUSRED))
Global ICOSTATUS_BLUE = ImageID(CatchImage(#PB_Any, ?ICOSTATUSBLUE))

;By Default = RED
Global ICOSTATUS_COLOR= ICOSTATUS_RED

Procedure.L ICONO_STATUS_RUN_THREAD(PauseForChangeColor.L)
  Repeat
    If IconSTATUS_COLOR = IconSTATUS_RED
      IconSTATUS_COLOR = IconSTATUS_BLUE
    Else
      IconSTATUS_COLOR = IconSTATUS_RED
    EndIf
    Delay(PauseForChangeColor)
  ForEver
EndProcedure

CreateThread(@ICONO_ESTADO_RUN_THREAD(),250)
and in #egrid_NotifyCellType or #egrid_FormatCell on EsGrid_CallBack() I use:

Code: Select all

If *cellinfo\column = #ColSHEstado
  *cellinfo\celltype=#egrid_Icon  ; Columna tipo ICONO
  *cellinfo\width=16
  *cellinfo\height=16
  *cellinfo\param=IconSTATUS_COLOR
EndIf
But the Cells are empty; if I disable CreateThread(@ICONO_ESTADO_RUN_THREAD(),250) the Red icon appears correctly.

:roll: , Well, to resume my request, How can I change the Image in a cell each n time?

As always, thank you in advance.

Posted: Sat Jan 31, 2009 9:02 pm
by srod
A very strange request indeed! :)

Tested and works fine here. The thing is that whilst you have switched icons, you have not taken any steps to ensure that the grid is repainted! You must force Windows to repaint the grid before you will see any change.

The following is inefficient because it forces a repaint of the whole grid each time we switch icons. If it was me then I would add some code to just repaint individual cells etc.

Code: Select all

Procedure.l ICONO_STATUS_RUN_THREAD(PauseForChangeColor.L) 
  Repeat 
    If IconSTATUS_COLOR = icon 
      IconSTATUS_COLOR = icon2
    Else 
      IconSTATUS_COLOR = icon
    EndIf 
    If IsGadget(1)
      InvalidateRect_(GadgetID(#MyGrid), 0, 1)
      UpdateWindow_(GadgetID(#MyGrid))
    EndIf
    Delay(PauseForChangeColor) 
  ForEver 
EndProcedure 

Posted: Sat Jan 31, 2009 9:12 pm
by zikitrake
:shock: Nice! It works fine! (well, not very fine, because as you said, it 'eat' too many CPU)
In

Code: Select all

If IsGadget(1) 
1 = #MyGrid?

Thank you!, I need it to call the user attention about a running process in my app.

Posted: Sat Jan 31, 2009 9:19 pm
by srod
zikitrake wrote:...In

Code: Select all

If IsGadget(1) 
1 = #MyGrid?
Whoops yes; teach me to adjust the code after I post it! :)

**EDIT : let me know if it is just a single cell containing the icon and I'll provide you some code for just invalidating a single cell.

Posted: Sat Jan 31, 2009 9:27 pm
by zikitrake
:D Thank you!

Well, My Grid will have more than one 'animated'-Cell (always in the same column)

:lol: My FAKE code will be:

Code: Select all

Procedure.L ICONO_STATUS_RUN_THREAD(PauseForChangeColor.L)
  Repeat
    
    If IconSTATUS_COLOR = icon
      IconSTATUS_COLOR = icon2
    Else
      IconSTATUS_COLOR = icon
    EndIf
    
    For R.L = 0 To egrid_NumberOfRows(#MyGrid) -1
      If egrid_GetCellText(#MyGrid, 0,R)  = "Running"
        egrid_SetCellImage(#MyGrid, 0,R, IconSTATUS_COLOR)  ; <---- THIS ISN'T A REALL Egrid command
      EndIf
    Next

    Delay(PauseForChangeColor)

  ForEver
EndProcedure