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...

Post 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
I may look like a mule, but I'm not a complete ass.
fd
New User
New User
Posts: 3
Joined: Wed Oct 15, 2008 5:58 am
Location: France

Egrid lite

Post 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
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

egrid_GetCellText()
I may look like a mule, but I'm not a complete ass.
Coolman
Enthusiast
Enthusiast
Posts: 103
Joined: Sat Sep 03, 2005 4:07 pm

Post 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 ...
*** Excuse my bad English, I uses has translating program ***
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post 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.
I may look like a mule, but I'm not a complete ass.
Coolman
Enthusiast
Enthusiast
Posts: 103
Joined: Sat Sep 03, 2005 4:07 pm

Post 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)
*** Excuse my bad English, I uses has translating program ***
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post 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.
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...

Post 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.
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...

Post 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
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...

Post 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:
I may look like a mule, but I'm not a complete ass.
zikitrake
Addict
Addict
Posts: 868
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Post 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.
Last edited by zikitrake on Sat Jan 31, 2009 9:06 pm, edited 1 time in total.
PB 6.21 beta, PureVision User
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post 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 
I may look like a mule, but I'm not a complete ass.
zikitrake
Addict
Addict
Posts: 868
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Post 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.
PB 6.21 beta, PureVision User
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post 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.
I may look like a mule, but I'm not a complete ass.
zikitrake
Addict
Addict
Posts: 868
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Post 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 
PB 6.21 beta, PureVision User
Post Reply