Hi Alex, Thanks for the reply.
I have read and read that tutorial over and over... It works fine if I copy and paste it into a test project. I just can't integrate it into my project. I've already dragged and dropped a treeview in the designer..so surely its already been assigned? The treeview is on a page in a notebook widget..so its already been added to the parent? On 19 Sep 2013 10:38, "Alex Willmy" <[email protected]> wrote: > Am 18.09.2013 17:41, schrieb jaymarvels: > > > I can't even make any headers appear when doing; >> >> >> teamListView = new Gtk.TreeView (); >> //add in cols >> Gtk.TreeViewColumn fNamecol = new >> Gtk.TreeViewColumn (); >> fNamecol.Title = "First Name"; >> Gtk.TreeViewColumn sNamecol = new >> Gtk.TreeViewColumn (); >> fNamecol.Title = "Second Name"; >> >> teamListView.AppendColumn (fNamecol); >> teamListView.AppendColumn (sNamecol); >> >> Gtk.ListStore nameListStore = new Gtk.ListStore >> (typeof(string), >> typeof(string)); >> teamListView.Model = nameListStore; >> >> >> Its blank..nothing..i'd expect at the minimum to see 2 column headers. >> > > > You have to add the TreeView to a parent widget and then call ShowAll() on > the parent (or the top level widget). For example if the parent is an > Gtk.HBox you do it like this: > > teamListView = new Gtk.TreeView (); > hbox1.Add (teamListView); > > // Setting up your model and columns > > hbox1.ShowAll (); > > More info on TreeViews in C# can be found here: > > http://www.mono-project.com/**GtkSharp_TreeView_Tutorial<http://www.mono-project.com/GtkSharp_TreeView_Tutorial> > > ______________________________**_________________ > Gtk-sharp-list maillist - > [email protected].**com<[email protected]> > http://lists.ximian.com/**mailman/listinfo/gtk-sharp-**list<http://lists.ximian.com/mailman/listinfo/gtk-sharp-list> >
_______________________________________________ Gtk-sharp-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
