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

Developed or developing a new product in PureBasic? Tell the world about it.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

That's it - I'm officially requesting asylum and emigrating to Australia.

I could open up an 'egrid' shop - "egrid, get your egrid here!"

That and a pint of Fosters of course!

:D

Thanks guys. I think its getting close now. What with all the adjustments and bug fixes today (most caused by the adjustments!) There can't be many bugs left (famous last words!) Look out for the update tomorrow.
I may look like a mule, but I'm not a complete ass.
stubbsi
User
User
Posts: 50
Joined: Tue Jul 04, 2006 8:59 pm
Location: Mt Martha, Australia

Post by stubbsi »

at least it will be warmer, 33c in Melbourne today

early hot patch - normally this doesn't happen until Dec/Jan

El Nino in action

You're welcome anytime
Vincit qui primum gerit
"The Old Farts Wins" or "He Conquers Who First Grows Old"
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post by Dare »

Yep.

You'll enjoy whipping the Poms at Cricket, League, Union, Soccer .. inexhaustable list ..

:twisted:




Edit:

lol @ your extended signature stubbsi - but as long as all the ports still work ..
Dare2 cut down to size
stubbsi
User
User
Posts: 50
Joined: Tue Jul 04, 2006 8:59 pm
Location: Mt Martha, Australia

Post by stubbsi »

@dare

you know the older I get, the less the eyes work (glasses help) - let alone other fittings
Vincit qui primum gerit
"The Old Farts Wins" or "He Conquers Who First Grows Old"
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post by Dare »

:lol:

Mate, you're still a spring chicken. BTW, you'll be pleased to know that as you get older still it all seems to come good again .. senile dementia has it's advantages!


Anyhow, I'll stop hijacking this thread now.
Dare2 cut down to size
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Post by Fangbeast »

stubbsi wrote:@dare

you know the older I get, the less the eyes work (glasses help) - let alone other fittings
Stubbsi maaate, I share your pain. Had to have reading glasses just to cope with perving on the sheilas in the streets of Melbourne. I'll tell ya one thing, 33 degress bought out the miniskirts and low tank tops today. No wonder my damned eyes are so bad!

@Srod Emigrate quickly, I'ts an asylum here already and I can show you some of the pictures!!! Some of them will make you get here faster (evil grin).
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

:lol:
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 »

**Update - 12 October 2006.

Uploaded new versions of the library with the amendments/fixes detailed above (+ a few others!)

http://www.purecoder.net/egrid.htm
I may look like a mule, but I'm not a complete ass.
magicjo
User
User
Posts: 61
Joined: Sun May 07, 2006 10:43 am
Location: Italy

Post by magicjo »

Hi srod:
just a few notes:
1) CellCallback is not called when press function keys while in edit mode.
2) Entering on an string edit cell(both with left click or form a cell to other) is possible to select all text instead of move the caret to the end of last character ?
3) I've noticed that the last gridline is not painted when add a new row at runtime (for example pressing a button for adding a new row), but if you hide the window and show again then the last gridline reappear.

I've the latest beta 3.
PB Registered User, Egrid Registered User
Win7 x64 Ultimate, 4,00 Gb Mem, Ati Radeon HD4600 Series, Realtek High Definition Audio Integrated
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

magicjo wrote:Hi srod:
just a few notes:
1) CellCallback is not called when press function keys while in edit mode.
2) Entering on an string edit cell(both with left click or form a cell to other) is possible to select all text instead of move the caret to the end of last character ?
3) I've noticed that the last gridline is not painted when add a new row at runtime (for example pressing a button for adding a new row), but if you hide the window and show again then the last gridline reappear.

I've the latest beta 3.
1) That's probably correct but I haven't investigated because its not something I've deemed necessary. There's no reason why you cannot trap the keys yourself.

2) Not presently, although easy to add. Is this important?

3) No problem here. I cancel all painting to the egrid whilst adding rows and whilst I can't remember why I did this, removing it should remove the problem. However, it is strange that I cannot reproduce this on Win XP Home. What OS are you running?
I may look like a mule, but I'm not a complete ass.
magicjo
User
User
Posts: 61
Joined: Sun May 07, 2006 10:43 am
Location: Italy

Post by magicjo »

Sorry for the I've back from work now,then :
1) ok, i'll try.
2) I think yes, but wait the request from others.
3) just try the following changed source : egrid4 demo1.pb:

Code: Select all

 DisableExplicit

;*****************************************FONT DATA****************************************
Enumeration
  #head1
  #head2
  #main
EndEnumeration
LoadFont(#main, "Arial", 9)
;SetGadgetFont(#PB_Default,FontID(#main))
;******************************************************************************************


;*************************************WINDOW + GADGET LIST*********************************
If OpenWindow(0,0,0,640,300,"egrid4 demo 1.",#PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget|#PB_Window_Maximize|#PB_Window_ScreenCentered) And CreateGadgetList(WindowID(0))
  ;******************************************************************************************
  ButtonGadget(0,5,5,50,50,"")
  
  ;********************************************EGRID*****************************************
  ;Create an egrid with resizable columns.
  egrid_CreateGrid(1, WindowWidth(0)/4, WindowHeight(0)/8, WindowWidth(0)/2, WindowHeight(0)/2,42,#egrid_gridlines, #egrid_ResizeColumnsTrue|#egrid_MultiLineText)
  ;******************************************************************************************
  egrid_SetHeaderHeight(1, 32)
  egrid_SetOptions(1, -1, #Black, 2)
  
  ;********************************************TEXT GADGET***********************************
  
  ;***************************************ADD COLUMNS AND ROWS TO EGRID**********************************
  egrid_AddColumn(1,b,"Col " + Str(b),100)
  ; For b=0 To 49 ;50 columns. 
    ; egrid_AddColumn(1,b,"Col " + Str(b),100)
  ; Next
  egrid_AddRow(1,-1)
  ; For b=0 To 99            ; Add 10 rows.
    ; egrid_AddRow(1,-1)
  ; Next
  
  
  ;*****************************************EVENT LOOP***************************************
  Repeat
    EventID = WaitWindowEvent()
    
    Select EventID
      
      Case #PB_Event_Gadget
        Select EventGadget() 
        Case 0
          egrid_AddRow(1,-1)
        EndSelect
    EndSelect
  Until EventID = #PB_Event_CloseWindow
  
EndIf
  
End 
and click the button (I've Win Xp Pro)
PB Registered User, Egrid Registered User
Win7 x64 Ultimate, 4,00 Gb Mem, Ati Radeon HD4600 Series, Realtek High Definition Audio Integrated
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

That is weird!

I'm on it.
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 »

Fixed. :)

It's a Windows issue.

Will include in the next upload - unless you're desperate for it now?
I may look like a mule, but I'm not a complete ass.
mskuma
Enthusiast
Enthusiast
Posts: 573
Joined: Sat Dec 03, 2005 1:31 am
Location: Australia

Post by mskuma »

For a change, not a bug report :) just wanted to confirm the right approach. I doing a re-sort of presented data upon on a click of a column's header. To kick off the grid, I'm initialising it with data from a linked list. When I click on the particular column's header, this will call a procedure which re-sorts the linked list, calls egrid_ClearRows(1) & repopulates the grid (egrid_AddRow(1,-1)/egrid_SetCellText). Seems pretty straightforward.. is that the best approach to do it, or is there a smarter way using other egrid functionality?
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

I reckon so, at least until I introduce 'virtual' egrids - although this will only save on reloading the egrid row by row. Actually most of the work for a virtual grid is already done by way of the CellCallback function etc.

It's much the same with any listicon in this respect.

:)

I'll give the virtual grids some more thought.
I may look like a mule, but I'm not a complete ass.
Post Reply