Page 4 of 4
Re: MicroGrid ~ Does anyone want Rev0.96?
Posted: Mon Mar 17, 2014 5:49 pm
by Kwai chang caine
i have not good explain.
How you do for passing the picture in the first column an text in the second ??
Re: MicroGrid ~ Does anyone want Rev0.96?
Posted: Mon Mar 17, 2014 8:12 pm
by blueznl
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

)
Re: MicroGrid ~ Does anyone want Rev0.96?
Posted: Mon Mar 17, 2014 8:53 pm
by RichardL
@blueznl
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?
Posted: Mon Mar 17, 2014 9:19 pm
by RichardL
@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:
Code: Select all
#uGrid_CellImageFlip ; A cell that can display either of two defined images.
The syntax of the command is:
Code: Select all
uGridSetCellType(Gadget,cx,cy,cw,ch,Flag,FlagSwitch=#True)
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:
uGridSetCellType(#Gad_Grid3,1,0,2,-1,#uGrid_CellImageFlip) ; Columns 2 and 3 to be images.
...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.
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:
uGridSetCellType(#Gad_Grid3,0,0,1,-1,#uGrid_CellImageFlip) ; Column 0 to be images.
OK?
RichardL
Re: MicroGrid ~ Does anyone want Rev0.96?
Posted: Fri Mar 28, 2014 1:59 pm
by Frank Smart
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
Re: MicroGrid ~ Does anyone want Rev0.96?
Posted: Fri Mar 28, 2014 4:14 pm
by RichardL
@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
Re: MicroGrid ~ Rev 0.97 Small fixes and new features
Posted: Thu Apr 17, 2014 4:42 pm
by RichardL
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
Re: MicroGrid ~ Does anyone want Rev0.96?
Posted: Fri Apr 18, 2014 10:47 am
by Kwai chang caine
I wait....no probem
Thanks Richard

Re: MicroGrid ~ Rev 0.97 now available.
Posted: Mon Jun 16, 2014 7:32 pm
by aaaaaaaargh
Awesome!
Re: MicroGrid ~ Rev 0.97 now available.
Posted: Mon Jun 16, 2014 10:15 pm
by Andre
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)
Re: MicroGrid ~ Rev 0.97 now available.
Posted: Tue Jun 24, 2014 9:34 am
by RichardL
@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!
Re: MicroGrid ~ Rev 0.97 now available.
Posted: Tue Jun 24, 2014 9:35 am
by RichardL
Duplicated in error.
@Moderator, please delete, if convenient. Thanks.
Re: MicroGrid ~ Rev 0.97 now available.
Posted: Tue Jun 24, 2014 9:46 am
by Kwai chang caine
In life..the holiday is important...mainly for the brain

The big oxygen of mountains...again more

Re: MicroGrid ~ Rev 0.97 now available.
Posted: Fri Nov 20, 2015 5:32 pm
by Niffo
Thank you VERY much for this great work !