[Gtk-sharp-list] Stetic

Milosz Tanski milosz at mindtouchsoftware.com
Sat Aug 5 10:56:52 EDT 2006


With stetic you can only create the TreeView widget, but not add columns
or entries. Here is an example of how to do it once you have your widget

// Create our column to our TreeView
Gtk.TreeViewColumn ColOne = new Gtk.TreeViewColumn();
ColOne.Title = "One";

// Create a renderer for our column
Gtk.CellRendererToggle RenOne = new Gtk.CellRendererToggle();
ColOne.PackStart(RenOne, false);

// Add our collumn to the TreeView

// Create our storage model (ListStore) with one text entry. 
Gtk.ListStore List = new Gtk.ListStore(typeof(string));

List.AppendValues("Hi, I'm the first thing in our TreeStore widget");

// Add our store met
MyTv.Model = List;

This should more or less, create a TreeView column, Storage Method, and
add one entry (minus any typos). At first glance it might seam
complicated... but once you get the basic idea it isn't and it's very
powerful. Hope it helps. 

Also I hope I didn't miss anything, since it is Friday night ;)

On Fri, 2006-08-04 at 23:51 +0200, Attila Zilizi wrote:
> Hello There.
> I'm studiing how to use GTK#.
> When I create a TreeView with monodevelop's stetic I don't know how to
> add columns to that treeview. All I can see is a white window. On the
> net I only found GTK# tutorials, but those programs GUI is created
> without a designer.
> Do you know any more advanced and detailed monodevelop-stetic or glade#
> manuals, tutorials?
> Please let me know. Thank You.
> Attila Zilizi
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

More information about the Gtk-sharp-list mailing list