Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get resizable and sortable columns using a NodeView?

I'm just starting out with GTK# and I have a NodeView working and now I want to enable the columns to be resizable and sortable by the user (like the details view mode in Windows Explorer). I have poked around on the internet but can't find help. Am I using the wrong widget for this??

EDIT: Finally moved my answer to a proper answer post, see below.

Thanks! Jason

like image 207
programmer Avatar asked Mar 14 '12 03:03

programmer


1 Answers

Okay, I found out how to make the columns resizeable but you have to set it on each column the way I figured it out. I'm still wondering if there is a way to make them all resizeable by setting something on the NodeView itself. Anyhoo, here is my resize solution:

myView.AppendColumn ("Genre", new CellRendererText (), "text", 5).Resizable = true;

After a little snooping in other people's code it appears that I need to attach sort logic to the data store.

like image 73
programmer Avatar answered Nov 03 '22 21:11

programmer