WxGrid question. Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Dark Alchemist
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Wed Nov 02, 2005 10:33 am

WxGrid question.

Post by Dark Alchemist » Fri Jul 02, 2010 3:15 pm

Is there any way I can add 2 buttons (up/dwn) per row or a way to drag a row and slide it into another row of a wxgrid?

I need functionality of being able to allow people to move the rows (3 columns per row)?

I think the button approach would be best since I would have to realign the data in the linked list that the grid is created from but I am wide open for any suggestions.

Thanks.

yuri
Earned some good credits
Earned some good credits
Posts: 104
Joined: Thu Apr 09, 2009 4:58 pm
Location: Russia

Post by yuri » Fri Jul 02, 2010 5:48 pm

if this operation is not frequent then it might be better to arrange it and other similar actions in a pop-up menu or even main top level menu, depending on your GUI layout.

But if you really think that user would need these buttons on every row you may draw them yourself using extra column or two with custom renderer, look it up in documentation.

Debster
Knows some wx things
Knows some wx things
Posts: 32
Joined: Sat Aug 20, 2005 6:01 pm

Post by Debster » Fri Jul 02, 2010 9:30 pm

I like this feature too.Buttons for insert/delete a row are nice too.Maybe you can extend the row label window?

Dark Alchemist
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Wed Nov 02, 2005 10:33 am

Post by Dark Alchemist » Mon Jul 05, 2010 9:06 pm

Well, an up and down button drawn in a separate column would work but which documentation would do this?

Now I will tell you something I am really fascinated by and that is the DAW (Digital Audio Workstation) called FL Studio. In V9 they seem to have added the ability to literally pull something off of a list and slap it into something. You actually drag it off the browser and pull it to where you want (the selection detaches and is under your cursor) then you drop it. I have absolutely no idea how in the world they did that and while overkill for my purposes is just one of those things that makes my jaw drop.

So, where would I find the documentation about this custom renderer in an extra column or two?

JimFairway
wxWorld Domination!
wxWorld Domination!
Posts: 1059
Joined: Sun Dec 30, 2007 6:40 pm
Location: Canada

Post by JimFairway » Tue Jul 06, 2010 1:40 am

Hi,


Check out http://docs.wxwidgets.org/stable/wx_wxg ... llrenderer and look at the sample in /wx/samples/grid/ it shows an example renderer.

Jim
OS: Vista SP1, wxWidgets 2.8.7.

Dark Alchemist
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Wed Nov 02, 2005 10:33 am

Post by Dark Alchemist » Tue Jul 06, 2010 5:22 pm

I will have to read up on this technique.

Thanks everyone. :)

Post Reply