[MonoDevelop] trouble showing data in NodeView (Daniel Petersen)

Vladimir Giszpenc vgiszpenc at dsci.com
Wed Mar 18 08:01:18 EDT 2009


> during runtime so I'm missing something.  Here's my code within the
> 'MainWindow' class:
> 
> ******
> public MainWindow (): base (Gtk.WindowType.Toplevel)
>     {
>         Build ();
>         populateNodeView();
>     }
> 
> private void populateNodeView()
>     {
>         NodeStore store = new NodeStore (typeof (MyTreeNode));
>         store.AddNode(new MyTreeNode ("yomama", "yesterday!"));
>         store.AddNode(new MyTreeNode ("walk", "like it's the first"));
> 
>         jobsView = new NodeView (store);

You are creating a new Widget here.  Try jobsView.NodeStore = store;
If jobsView = this.yourNodeViewWidgetHere then you should be fine...

>         jobsView.AppendColumn ("ID", new CellRendererText(), "text",
> 0);
>         jobsView.AppendColumn ("Title", new CellRendererText(), "text",
> 1);
>         jobsView.ShowAll();

I don't think ShowAll() is necessary but I am no expert.

>     }

Also, this is technically a Gtk sharp question :).

Cheers,

Vlad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3685 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/monodevelop-list/attachments/20090318/1fc630a3/attachment.bin 


More information about the Monodevelop-list mailing list