MicroGrid ~ Rev 0.97 now available.
- Kwai chang caine
- Always Here
- Posts: 5494
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: MicroGrid ~ Does anyone want Rev0.96?
i have not good explain.
How you do for passing the picture in the first column an text in the second ??
How you do for passing the picture in the first column an text in the second ??

Not a destination
Re: MicroGrid ~ Does anyone want Rev0.96?
Thanks for posting. I'm in need of *some* editable grid and for some reason I'm not too much into coding one myself today
Haven't tried your code yet, but before I do: any kind of strings / license attached, or is it FFA? (Free For All
)

Haven't tried your code yet, but before I do: any kind of strings / license attached, or is it FFA? (Free For All

( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
Re: MicroGrid ~ Does anyone want Rev0.96?
@blueznl
No strings, ropes or cordage of any type in sight! Enjoy... but on your own head be it.
RichardL
No strings, ropes or cordage of any type in sight! Enjoy... but on your own head be it.
RichardL
Re: MicroGrid ~ Does anyone want Rev0.96?
@KCC
If you look at the manual for the description of uGridSetCellType() you will see that you can set any cell (or rectangular area of cells) to be flagged as being one of a several types. The cell type you are using is:
The syntax of the command is:
cx,cy,cw and ch follow the same conventions as for drawing a graphical rectangle... X,Y,Width,Height.
The only special cases are:
If 'cx' = 0 and cw= -1 the value of 'ch' is interpreted as the height of the grid.
If 'cy' = 0 and ch = -1 the value of 'cw' is interpreted as the width of the grid.
If 'cx' and 'cy' are both 0 and 'cw' and 'ch' are both -1 the whole grid area is adjusted.
So... in your example:
So, if you want to change all the cells in column 0 from the default Text type to #uGrid_CellImageFlip you would write something like this:
RichardL
If you look at the manual for the description of uGridSetCellType() you will see that you can set any cell (or rectangular area of cells) to be flagged as being one of a several types. The cell type you are using is:
Code: Select all
#uGrid_CellImageFlip ; A cell that can display either of two defined images.
Code: Select all
uGridSetCellType(Gadget,cx,cy,cw,ch,Flag,FlagSwitch=#True)
The only special cases are:
If 'cx' = 0 and cw= -1 the value of 'ch' is interpreted as the height of the grid.
If 'cy' = 0 and ch = -1 the value of 'cw' is interpreted as the width of the grid.
If 'cx' and 'cy' are both 0 and 'cw' and 'ch' are both -1 the whole grid area is adjusted.
So... in your example:
...1,0,2,-1... means starting at X=1,Y=0 with a width of 2 columns and for the whole column height the cells are type #uGrid_CellImageFlip.uGridSetCellType(#Gad_Grid3,1,0,2,-1,#uGrid_CellImageFlip) ; Columns 2 and 3 to be images.
So, if you want to change all the cells in column 0 from the default Text type to #uGrid_CellImageFlip you would write something like this:
OK?uGridSetCellType(#Gad_Grid3,0,0,1,-1,#uGrid_CellImageFlip) ; Column 0 to be images.
RichardL
-
- New User
- Posts: 8
- Joined: Wed Jul 20, 2005 2:36 pm
Re: MicroGrid ~ Does anyone want Rev0.96?
Hello RichrdL,
thank you for sharing your good code. But when I try to compile the code from the first post. I get this Error message from the compiler:
---------------------------
PureBasic
---------------------------
The procedure 'uGridCallback()' has been declared but not defined.
---------------------------
OK
---------------------------
Did you post the right version of MicroGrid?
Thanks!
Best regards,
Frank
thank you for sharing your good code. But when I try to compile the code from the first post. I get this Error message from the compiler:
---------------------------
PureBasic
---------------------------
The procedure 'uGridCallback()' has been declared but not defined.
---------------------------
OK
---------------------------
Did you post the right version of MicroGrid?
Thanks!
Best regards,
Frank
Re: MicroGrid ~ Does anyone want Rev0.96?
@Frank
Originally the first post contained the uGrid library followed by a demo program.
Because the size of library+demo grew beyond the 60,000 character upload limit I had to spilt the two apart. So...
Download the library (which it sounds like you have done) and then join on the test/demo section that you will find a few postings later.
Better still, why not get the latest versions from DropBox (see my post of the 14th). I've just clicked the link and it is still live OK.
Richard
Originally the first post contained the uGrid library followed by a demo program.
Because the size of library+demo grew beyond the 60,000 character upload limit I had to spilt the two apart. So...
Download the library (which it sounds like you have done) and then join on the test/demo section that you will find a few postings later.
Better still, why not get the latest versions from DropBox (see my post of the 14th). I've just clicked the link and it is still live OK.
Richard
Re: MicroGrid ~ Rev 0.97 Small fixes and new features
Hi,
I'm just finishing some tests on the latest version of MicroGrid and will post a Dropbox link here tomorrow.
Added: Link as promised: https://www.dropbox.com/sh/i24jfrjkg2g0j3l/LAc8xJwCrw
Most of the MicroGrid testing is now carried out by testing of my Amateur Radio Log Book which it uses extensively. As and when I find irritations or bugs they get sorted, but there are no major additions recently.
Here are the changes in the 0.97 update.
; Rev 0.97
; ========
; Fixed - Cursor not appearing a StringGadget() PB gadget after exiting a uGrid
; Fixed - Caret now killed when grid lost focus.
; Added - Caret now positioned properly when user clicks within a cell's text string.
; Mod - Cells type #uGrid_CellList are not cleared by uGridClearCell().
; Added - #uGridGridReceivedFocus New callback when a grid is first selected
; Mod - Mouse wheel moves selection cell vertically, as before. Hold down to move horizontally. ***
@KCC: Pictures soon I hope
Best regards,
RichardL
I'm just finishing some tests on the latest version of MicroGrid and will post a Dropbox link here tomorrow.
Added: Link as promised: https://www.dropbox.com/sh/i24jfrjkg2g0j3l/LAc8xJwCrw
Most of the MicroGrid testing is now carried out by testing of my Amateur Radio Log Book which it uses extensively. As and when I find irritations or bugs they get sorted, but there are no major additions recently.
Here are the changes in the 0.97 update.
; Rev 0.97
; ========
; Fixed - Cursor not appearing a StringGadget() PB gadget after exiting a uGrid
; Fixed - Caret now killed when grid lost focus.
; Added - Caret now positioned properly when user clicks within a cell's text string.
; Mod - Cells type #uGrid_CellList are not cleared by uGridClearCell().
; Added - #uGridGridReceivedFocus New callback when a grid is first selected
; Mod - Mouse wheel moves selection cell vertically, as before. Hold down to move horizontally. ***
@KCC: Pictures soon I hope

Best regards,
RichardL
Last edited by RichardL on Fri Apr 18, 2014 4:19 pm, edited 1 time in total.
- Kwai chang caine
- Always Here
- Posts: 5494
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: MicroGrid ~ Does anyone want Rev0.96?
I wait....no probem
Thanks Richard

Thanks Richard


Not a destination
- aaaaaaaargh
- User
- Posts: 55
- Joined: Thu Jul 27, 2006 1:24 pm
- Andre
- PureBasic Team
- Posts: 2137
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Re: MicroGrid ~ Rev 0.97 now available.
It seems to be a very interesting code!
Any chance to get it adapted/working on MacOS? (replacing/avoiding the xxxCaretxxx_() WinAPI commands and the Windows callback)

Any chance to get it adapted/working on MacOS? (replacing/avoiding the xxxCaretxxx_() WinAPI commands and the Windows callback)
Re: MicroGrid ~ Rev 0.97 now available.
@Andre
I'm on holiday, welcoming a new (4 days old today) granddaughter to her home in the French Alps and enjoying the sun and wine
However, I brought a laptop with me to keep in touch and work on my current project... but not too much!
I am using uGrid in my own projects and the rate of updating/patching has dropped to a satisfactorily low level, so maybe it is time to stir it up again.
I do not have the uGrid source files with me, but from recollection... I can probably get rid of any Windows callbacks with BindEvent() (Not tried yet... I have only just upgraded) and that just leaves the caret to make OS independent. My current thoughts are to use a small borderless window as the caret and hide/unhide it with a timer. The positioning will need to be tied to uGrid's underlying CanvasGadget() and visibility controlled taking account of Z level and a switching mechanism. Seems a bit heavy.... OK, something to think about!
... and I've got KCC wondering when I will get the overdue picture management sorted
Best regards to all uGrid users, I'll be back home in time for the UK GrandPrix!
RichardL
Edit: I just found a source file for uGrid only a few weeks out of date... NO WINDOWS CALLBACK!... one less thing to do!
I'm on holiday, welcoming a new (4 days old today) granddaughter to her home in the French Alps and enjoying the sun and wine

However, I brought a laptop with me to keep in touch and work on my current project... but not too much!
I am using uGrid in my own projects and the rate of updating/patching has dropped to a satisfactorily low level, so maybe it is time to stir it up again.
I do not have the uGrid source files with me, but from recollection... I can probably get rid of any Windows callbacks with BindEvent() (Not tried yet... I have only just upgraded) and that just leaves the caret to make OS independent. My current thoughts are to use a small borderless window as the caret and hide/unhide it with a timer. The positioning will need to be tied to uGrid's underlying CanvasGadget() and visibility controlled taking account of Z level and a switching mechanism. Seems a bit heavy.... OK, something to think about!
... and I've got KCC wondering when I will get the overdue picture management sorted

Best regards to all uGrid users, I'll be back home in time for the UK GrandPrix!
RichardL
Edit: I just found a source file for uGrid only a few weeks out of date... NO WINDOWS CALLBACK!... one less thing to do!
Last edited by RichardL on Tue Jun 24, 2014 9:51 am, edited 1 time in total.
Re: MicroGrid ~ Rev 0.97 now available.
Duplicated in error.
@Moderator, please delete, if convenient. Thanks.
@Moderator, please delete, if convenient. Thanks.
Last edited by RichardL on Tue Jun 24, 2014 11:59 am, edited 1 time in total.
- Kwai chang caine
- Always Here
- Posts: 5494
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: MicroGrid ~ Rev 0.97 now available.
In life..the holiday is important...mainly for the brain 
The big oxygen of mountains...again more

The big oxygen of mountains...again more


Not a destination