Canvas based Grid gadget

Share your advanced PureBasic knowledge/code with the community.
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: Canvas based Grid gadget

Post by Andre »

Thanks a lot, said! :D

Works very well on MacOS too, as I just tested with your newest .pbi :D

I only had to add the following code to have the missing color constant on MacOS:

Code: Select all

CompilerIf Not Defined(White, #PB_Constant)
  #White = $EEEEEE
CompilerEndIf
That's why I supported this topic in the wishlist: http://www.purebasic.fr/english/viewtop ... 50#p468950 :twisted:
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5342
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Canvas based Grid gadget

Post by Kwai chang caine »

Very nice, EXCEL class :shock:
Thanks for your great job and mainly for sharing 8)
ImageThe happiness is a road...
Not a destination
said
Enthusiast
Enthusiast
Posts: 342
Joined: Thu Apr 14, 2011 6:07 pm

Re: Canvas based Grid gadget

Post by said »

Kiffi, ozzie, LuckyLuke, Fred, Andre and Kwai chang caine (that's quite a looong nickname) ... Thank you all for the nice words :D :D You are welcome

This grid gadget as is now is good .... but in reality we are using in our applications a newer and better version ... Since there is so much interest in that grid, give me some time so i pack the new version (along with some help) and upload it, i hope you will like it :) :)

In case the PB team finds that my grid deserves be part of PB ... this will be my honor 8) 8) 8)

Said
Niffo
Enthusiast
Enthusiast
Posts: 500
Joined: Tue Jan 31, 2006 9:43 am
Location: France

Re: Canvas based Grid gadget

Post by Niffo »

Thank you VERY much for your work !

Would love to see the last non public version you are talking about.
Niffo
mestnyi
Addict
Addict
Posts: 995
Joined: Mon Nov 25, 2013 6:41 am

Re: Canvas based Grid gadget

Post by mestnyi »

Code: Select all

#PB_Shortcut_Prior
#PB_Shortcut_Next
writes undefined
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Canvas based Grid gadget

Post by mk-soft »

Constant has been changed...

Code: Select all

#PB_Shortcut_PageUp
#PB_Shortcut_PageDown
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Andrew Lindsay
User
User
Posts: 24
Joined: Mon May 30, 2011 12:17 pm

Re: Canvas based Grid gadget

Post by Andrew Lindsay »

Said, or anyone else that may be able to help...

Is there any way to override the default behaviour of printing the row and column headers, or to change them to something else?

I would like to be able to use the grid as a data input form for multiple columns of input, perhaps even having the column labels based on entries in a list in another grid.

Any assistance would be appreciated.

Best regards

Andrew
Andrew Lindsay
-----------------------------------------
said
Enthusiast
Enthusiast
Posts: 342
Joined: Thu Apr 14, 2011 6:07 pm

Re: Canvas based Grid gadget

Post by said »

Andrew Lindsay wrote:Said, or anyone else that may be able to help...

Is there any way to override the default behaviour of printing the row and column headers, or to change them to something else?

I would like to be able to use the grid as a data input form for multiple columns of input, perhaps even having the column labels based on entries in a list in another grid.

Any assistance would be appreciated.

Best regards

Andrew
Sure you can change the default headers!
Have you tried MyGrid_SetText() ?!
Row or Col Headers are Col = 0 and Row = 0

Said
Andrew Lindsay
User
User
Posts: 24
Joined: Mon May 30, 2011 12:17 pm

Re: Canvas based Grid gadget

Post by Andrew Lindsay »

Yes, I tried that and nothing changed. I was wondering if there was something I was going wrong.

When I get home I will send through my example.

Also, is there a way to limit the number of columns and rows, say 3 columns and 10 rows?
Andrew Lindsay
-----------------------------------------
Andrew Lindsay
User
User
Posts: 24
Joined: Mon May 30, 2011 12:17 pm

Re: Canvas based Grid gadget

Post by Andrew Lindsay »

OK, yes that worked, not sure why it did not work, previously, perhaps I hit run instead of compile when I tried it.

Are you able to assist in how to limit the size of the grid (number of rows x number of columns)?

Best regards
Andrew Lindsay
-----------------------------------------
said
Enthusiast
Enthusiast
Posts: 342
Joined: Thu Apr 14, 2011 6:07 pm

Re: Canvas based Grid gadget

Post by said »

Andrew Lindsay wrote:OK, yes that worked, not sure why it did not work, previously, perhaps I hit run instead of compile when I tried it.

Are you able to assist in how to limit the size of the grid (number of rows x number of columns)?

Best regards
Good it worked :D as for the number of rows, columns

1. In case you know prior to creating the grid the required number of rows, cols then you can define them in MyGrid_New() while creating the grid
2. otherwise, you need to re-dimension the grid after creating it then you can use:
2.1 MyGrid_ReDefine() ... this will clear any previous content, you can re-define nbr of rows/cols
2.2 MyGrid_ReDefineRows() ... this can be used to adjust the number of rows but keeping the same number of columns, it will preserve the contents (if you are shrinking or keep whatever is there if you are enlarging)

After creating the grid you cannot change the number of columns without clearing all contents!

Said
said
Enthusiast
Enthusiast
Posts: 342
Joined: Thu Apr 14, 2011 6:07 pm

Re: Canvas based Grid gadget

Post by said »

Hi All,

After a long time, here is a new update of this grid, many new improvements, for more details see first post :D

The nest update will be in 2019 :mrgreen:
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: Canvas based Grid gadget

Post by davido »

@said,
A very good update. Impressive!

Thank you for sharing, all the hard work you have put in to developing it.
:D
DE AA EB
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: Canvas based Grid gadget

Post by Andre »

Very good, thank you very much! :D
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5342
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Canvas based Grid gadget

Post by Kwai chang caine »

Waooouhhh !!!
The insert image, the adjust width and height column at double clic :shock:
A real jewel, thanks a lot for this precious sharing 8)
ImageThe happiness is a road...
Not a destination
Post Reply