[Gtk-sharp-list] TreeView nightmares

Aaron Oxford aaron at hardwarehookups.com.au
Thu Mar 15 06:17:22 EDT 2007

Hi Luciano,

At 01:18 AM 15/03/2007, you wrote:
>I'm not really sure if i understand you, but i guess:
>ListStore panelStore = new ListStore(typeof(string), typeof(string), 
>typeof(CustomObject), typeof(int));
>myTreeView.AppendColumn("Description 1", new CellRendererText(), "text", 0);

Bing! So the constructor of the ListStore is what decides what is 
stored, and the columns just determine what is displayed.

>object myObject = (object)myTreeView.Model.GetValue(iter, 2) // My Object

OK, assuming this code works... yep it does, I think my problem 
wasn't that I couldn't store my object, but that I hadn't given the 
store any idea what it was storing in column two. me = stupid.

>I hope it helps :)

Very helpful. Thankyou so much again.


Aaron Oxford   -   aaron+hardwarehookups .com .au
Director, Innovative Computer Solutions (Aust) Pty. Ltd.
49 Maitland Rd, Mayfield, NSW 2304 Australia
Developer, SourceForge project VioLet Composer

More information about the Gtk-sharp-list mailing list