GridGadget
GridGadget
Here's my attempt at building a grid gadget using the new canvas gadget.
It works on MacOSX and Windows - and should work without too much modifications on Linux, I just can't be bothered...
The MacOSX version showcases some of the CanvasGadget limitation/bugs on this platform (mouse events not reported when outside the canvas, plus the returned character which is wrong, it's fixed well on Windows, and almost fixed on MacOS - though you can't write accentued characters on the MacOS version).
It's not really optimised as well, mouse selection might be slow when the window is maximised.
This aside, I tried to recreate some of the Excel behaviour, you can do multiple selections, cell editing (except on A1 which is a locked cell), basic copy and paste works with Control(Command) C/V, text formatting (fully working, though this example might show some unexpected results as I didn't took much time in doing it).
Tell me what you think of it!
Download (Mac) (zipped .app): http://www10.zippyshare.com/v/84742793/file.html
Download (Windows): http://www10.zippyshare.com/v/19500970/file.html
It works on MacOSX and Windows - and should work without too much modifications on Linux, I just can't be bothered...
The MacOSX version showcases some of the CanvasGadget limitation/bugs on this platform (mouse events not reported when outside the canvas, plus the returned character which is wrong, it's fixed well on Windows, and almost fixed on MacOS - though you can't write accentued characters on the MacOS version).
It's not really optimised as well, mouse selection might be slow when the window is maximised.
This aside, I tried to recreate some of the Excel behaviour, you can do multiple selections, cell editing (except on A1 which is a locked cell), basic copy and paste works with Control(Command) C/V, text formatting (fully working, though this example might show some unexpected results as I didn't took much time in doing it).
Tell me what you think of it!
Download (Mac) (zipped .app): http://www10.zippyshare.com/v/84742793/file.html
Download (Windows): http://www10.zippyshare.com/v/19500970/file.html
Re: GridGadget
Very nice.
- Windows version crashes on extreme window resizing.
Are you using stringgadgets for the editing?
- Windows version crashes on extreme window resizing.
Are you using stringgadgets for the editing?
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: GridGadget
What do you mean by extreme window resizing?
No string gadgets used, everything is a canvas plus two scrollbargadgets
No string gadgets used, everything is a canvas plus two scrollbargadgets
Re: GridGadget
On XP Pro sp3, the app crashes if I resize the window too small and then try to make it larger again.
Probably a math overflow or something.
Cool, you are drawing all the grid elements without a listview or listicon gadget?
Probably a math overflow or something.
Cool, you are drawing all the grid elements without a listview or listicon gadget?
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: GridGadget
Confirmed. Windows 7 Home Premium 32skywalk wrote:...the app crashes if I resize the window too small and then try to make it larger again.
The error occurs when you resize the height. There's probably a division by zero (when the top CanvasGadget height is 0)
Otherwise nice looking gadget.
Last edited by TomS on Tue Jul 19, 2011 12:10 am, edited 1 time in total.
Re: GridGadget
Yeah, I'm drawing everything, as it's the easiest way to have it crossplaftorm, and as i wanted to control the text color, size, etc it was better doing it all by myself
I'll look into the resizing bug tomorrow, thanks for testing!
I'll look into the resizing bug tomorrow, thanks for testing!
Re: GridGadget
This looks good! It's really nice to see what all of you suddenly come up with because of the new CanvasGadget().
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Re: GridGadget
Ok the resize bug is not a big deal, math overflow like skywalk hinted!
Re: GridGadget
That looks great polo. It's great to see all these uses of the CanvasGadget coming out
Windows 11, Manjaro, Raspberry Pi OS
-
- Enthusiast
- Posts: 536
- Joined: Mon Feb 16, 2009 10:42 am
- Location: sweden
- Contact:
Re: GridGadget
OMG!
All of these new gadgets are just fantastic. This is something I've really been longing for. I would like to add custom color/background images, icons and more mouseactions... will see if someone beats me to it (three weeks on "vacation" in Hong Kong, so I will try not to work...)
Nice work
All of these new gadgets are just fantastic. This is something I've really been longing for. I would like to add custom color/background images, icons and more mouseactions... will see if someone beats me to it (three weeks on "vacation" in Hong Kong, so I will try not to work...)
Nice work
Re: GridGadget
Text color and cell background color can be customised, it's not shown on this example
I'm not sure what I am going to add it next... I was thinking about dropdown cells, or a charting system
I'm not sure what I am going to add it next... I was thinking about dropdown cells, or a charting system
Re: GridGadget
Works great on OSX Lion as well:
-
- Addict
- Posts: 1656
- Joined: Sun Dec 12, 2010 12:36 am
- Location: Somewhere in the midwest
- Contact:
Re: GridGadget
This totally makes me want to play with the Canvas gadget..
I've always wanted to try making my own controls, but I figured it would be too hard...
Just curious, did you have to write your own routines to support typing in characters, and copy/paste, etc functions.. Its very fast either way, I always figured if I tried I would end up with some slow monster of a GUI (and I have no idea how to add all the typical functions controls have).
I've always wanted to try making my own controls, but I figured it would be too hard...
Just curious, did you have to write your own routines to support typing in characters, and copy/paste, etc functions.. Its very fast either way, I always figured if I tried I would end up with some slow monster of a GUI (and I have no idea how to add all the typical functions controls have).
Re: GridGadget
Yes it's my own routines for typing characters and most of the functions, only the scrollbars are PB's scrollbar (and Carbon scrollbars on OSX).Zach wrote:Just curious, did you have to write your own routines to support typing in characters, and copy/paste, etc functions.. Its very fast either way, I always figured if I tried I would end up with some slow monster of a GUI (and I have no idea how to add all the typical functions controls have).
I kinda stopped working on my grid gadget though, I'll wait until the Canvas Gadget bugs are fixed.