Enhanced wxGrid

Do you like to promote your wxWidgets based application or component!? Post it here and let's see what the critics have to say. Also, if you found that ONE wx component the world needs to know about, put it here for future reference.
metalogic
Super wx Problem Solver
Super wx Problem Solver
Posts: 307
Joined: Fri Oct 08, 2004 8:21 am
Location: Area 51
Contact:

Enhanced wxGrid

Post by metalogic » Tue Jan 03, 2006 6:26 am

Hi all,
I have started a project to enhance wxGrid. I am making the project available for feedback and once it is more mature, I will be submitting my changes as patches to wxWidgets, I don't intend to fork the source.

Currently I have implemented the following changes:
* Column and row labels are drawn in a more subtle and modern light 3D rather than the dark 3D.
* The text editor has no border. The 3D border looks rather dorky on a flat grid (plus no other grid does this).
* The columns can be dragged to another position by the user.

Get more info, screenshots and download here:
http://www.metalogicsw.com/temp/EnhancedwxGrid/

Looking forward to feedback from the great folks in this forum.
Last edited by metalogic on Wed Jan 04, 2006 5:37 am, edited 2 times in total.

priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia » Tue Jan 03, 2006 6:48 am

Just double click on the column header (A, B..), it crashes. also the coulmn movement code is buggy:
Image

metalogic
Super wx Problem Solver
Super wx Problem Solver
Posts: 307
Joined: Fri Oct 08, 2004 8:21 am
Location: Area 51
Contact:

Post by metalogic » Tue Jan 03, 2006 6:54 am

Wow, that was a quick response :) Thanks Priyank.

I will try to get the double-click issue looked at tomorrow.

Can you give me more details on "the column movement is buggy"? How did you get to the state of the screenshot?

priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia » Tue Jan 03, 2006 7:17 am

metalogic wrote:Can you give me more details on "the column movement is buggy"? How did you get to the state of the screenshot?
1.)Downloaded the package.
2.)Execute the exe
3.)Play with it for just 1 min
4.)Take screenshots.

:D Ok, there are no fixed steps, I just move the columns and I get some amazing behaviour.

metalogic
Super wx Problem Solver
Super wx Problem Solver
Posts: 307
Joined: Fri Oct 08, 2004 8:21 am
Location: Area 51
Contact:

Post by metalogic » Tue Jan 03, 2006 8:14 am

I took a quick look before going to bed. I'm able to shuffle the columns around for a while without a problem. But it looks like if I resize a column, things degrade rapidly from there.

The thing about this change is that it wasn't a matter of just adding some code to make the columns moveable, I also had to review all the existing code and make changes to it as before it assumed pos == id always. That is no longer true as col 5 may be at pos 2. There are over 10k lines of code in grid.cpp so it's really easy to miss a spot (or 10 :D).

Anyway, thanks again for the info, I'll be bug hunting tomorrow.

leio
Can't get richer than this
Can't get richer than this
Posts: 802
Joined: Mon Dec 27, 2004 10:46 am
Location: Estonia, Tallinn
Contact:

Post by leio » Tue Jan 03, 2006 9:16 am

Do you guys think that the wxGrid API is good?
I'm myself am hearing that it's quite awful often on IRC.
Would you be interested in working on a new API too, for which I could do a native wxGTK control if it's good?
That's a long-term goal of mine however, nothing I will manage to tackle before March probably, but if I see initiative from others, then...

Edit: to not hijack this thread, please post replies on my questions and idea in the new thread I created at http://forums.wxwidgets.org/viewtopic.php?p=26701
Compilers: gcc-3.3.6, gcc-3.4.5, gcc-4.0.2, gcc-4.1.0 and MSVC6
OS's: Gentoo Linux, WinXP; WX: CVS HEAD

Project Manager of wxMUD - http://wxmud.sf.net/
Developer of wxGTK;
gtk+ port maintainer of OMGUI - http://www.omgui.org/

metalogic
Super wx Problem Solver
Super wx Problem Solver
Posts: 307
Joined: Fri Oct 08, 2004 8:21 am
Location: Area 51
Contact:

Post by metalogic » Tue Jan 03, 2006 9:35 pm

leio,
I think an API cleanup is a good idea. I saw a few things I would like to change while working on these enhancements.

Since one of the goals of my enhancements is that they be easily accepted as a patch, extensive API changes are ruled out from my project. But I would be willing to collaborate on the API cleanup under a different project.

metalogic
Super wx Problem Solver
Super wx Problem Solver
Posts: 307
Joined: Fri Oct 08, 2004 8:21 am
Location: Area 51
Contact:

Post by metalogic » Wed Jan 04, 2006 5:36 am

I've uploaded an updated build.

This fixes some flakiness that occured when the columns were reshufled and then resized.

Thanks Priyank for the feedback.

It's available from the same link:
http://www.metalogicsw.com/temp/EnhancedwxGrid/

priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia » Wed Jan 04, 2006 6:31 am

Image
When presses the backspace button some times the grid lines disapper for the first and last rows.

metalogic
Super wx Problem Solver
Super wx Problem Solver
Posts: 307
Joined: Fri Oct 08, 2004 8:21 am
Location: Area 51
Contact:

Post by metalogic » Wed Jan 04, 2006 8:12 am

Fixed and uploaded.

Hopefully tomorrow I will get a chance to do a full review of grid.cpp to try and smoke out any remaining code that assumes pos == id (every bug so far has been caused by that).

Thanks.

metalogic
Super wx Problem Solver
Super wx Problem Solver
Posts: 307
Joined: Fri Oct 08, 2004 8:21 am
Location: Area 51
Contact:

Post by metalogic » Wed Jan 18, 2006 8:29 am

I've got another release uploaded (http://www.metalogicsw.com/temp/EnhancedwxGrid/). As far as my testing can tell, it's stable.

I also took some time to refactor my code a bit and work on the API needed to control the moving of columns around.

There were also some minor UI improvements such as the positioning of the edit box inside of the grid cell (it changed when it went from a 3D textbox to a flat, borderless one) and the column being dragged looking "pressed".

So I think I'm ready to call this Release Candidate 1. I'm going to do a last sanity check on everything tomorrow and if I don't have any changes, I will be submitting this as a patch on sourceforge.

If you have any feedback you would like to give before I submit the patch, do it now or forever hold your peace :wink:

Takeshi Miya
Earned a small fee
Earned a small fee
Posts: 12
Joined: Sun Jan 22, 2006 11:43 pm

Post by Takeshi Miya » Sun Jan 22, 2006 11:51 pm

Hi. I hope you are aware of the existance of wxSheet, which is a complete rewritte of wxGrid.

I REALLY hope that wxGrid, EnhancedwxGrid, and wxSheet will be merged into a single library in wxWidgets source. :)

Having three (or two) separate libraries is unacceptable. Right now if I would have to develop with a grid I don't know what one to choose. :(

metalogic
Super wx Problem Solver
Super wx Problem Solver
Posts: 307
Joined: Fri Oct 08, 2004 8:21 am
Location: Area 51
Contact:

Post by metalogic » Mon Jan 23, 2006 4:42 am

Takeshi,
I couldn't agree more. If you read my page (http://www.metalogicsw.com/temp/EnhancedwxGrid/) you will find this:
"I wish not to fork wxGrid or create a new project. Rather this is an incubator for working on new features which when mature enough will be submitted as patches to wxWidgets."

I hate forking.

And to prove that I am a man of my word :wink:, I already submitted my changes to SourceForge several days ago and I am eagerly waiting for this patch to be accepted (both Julian and Vadim expressed interest). See http://sourceforge.net/tracker/index.ph ... tid=309863

So if all goes well, my enhancements will be integrated in a future version of wxWidgets.

leio
Can't get richer than this
Can't get richer than this
Posts: 802
Joined: Mon Dec 27, 2004 10:46 am
Location: Estonia, Tallinn
Contact:

Post by leio » Mon Jan 23, 2006 9:18 am

We discussed the wxGrid and co ordeal a bit after the Bug Day aswell. Me, Chris Mellon and the wxGrid maintainer around the 2002/2003 days - Roger Gammans. He had a draft for a new wxGrid, and hoped to revise it soon, as it was quite out of date now too already.
We should have a log, uh, somewhere, of this bugday together with that talk.
Compilers: gcc-3.3.6, gcc-3.4.5, gcc-4.0.2, gcc-4.1.0 and MSVC6
OS's: Gentoo Linux, WinXP; WX: CVS HEAD

Project Manager of wxMUD - http://wxmud.sf.net/
Developer of wxGTK;
gtk+ port maintainer of OMGUI - http://www.omgui.org/

priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia » Mon Jan 23, 2006 1:36 pm

Hi metalogic,
Just a quick question, are you using the latest CVS head for your changes?

Post Reply