LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   gtk: table manipulation? (https://www.linuxquestions.org/questions/programming-9/gtk-table-manipulation-282656/)

jpollack 01-26-2005 07:49 PM

gtk: table manipulation?
 
I'm trying to write a cross platform program that will display a 2d array as a table. I want to be able to left click on a cell and drag the whole row up or down and then place it back into the table at a different location. Also, I want to be able to right click on a cell and drag the whole column left of right and then place it back into the table at a different location.

So far I've tried using gtk's liststore which has a built in function that allows the rows to be reorded as described but I can't seem to write code to get the columns to work as desired. I'm starting to think that liststore is the wrong way to approach this problem. Any insight would be great. Thanks.

Mara 01-27-2005 04:36 PM

I think that listview is the right widget, but you need to write your own callback for clicked events. Where do you have problems exactly? A small piece of code would help.

jpollack 01-27-2005 09:45 PM

Thanks for the reply, I've acutally started another approach, using tkinter which seems very promising. Tkinter is a lot lessed black boxed so I feel like I'm in more control if only because I understand what's going on better. I'll keep you posted.


All times are GMT -5. The time now is 11:52 PM.