Example #1
0
 protected override ITreeModelImplementor CreateModelImplementor()
 {
     model = new GtkEnumerableModel <object> {
         Handler = this, Count = collection != null ? collection.Count : 0
     };
     return(model);
 }
Example #2
0
		public ListBoxHandler()
		{
			model = new GtkEnumerableModel<object>{ Handler = this };
			
			scroll = new Gtk.ScrolledWindow();
			scroll.ShadowType = Gtk.ShadowType.In;
			Control = new Gtk.TreeView(new Gtk.TreeModelAdapter(model));
			Size = new Size(80, 80);
			//tree.FixedHeightMode = true;
			Control.ShowExpanders = false;
			scroll.Add(Control);

			Control.Events |= Gdk.EventMask.ButtonPressMask;

			Control.AppendColumn("Img", new Gtk.CellRendererPixbuf(), "pixbuf", 1);
			Control.AppendColumn("Data", new Gtk.CellRendererText(), "text", 0);
			Control.HeadersVisible = false;
		}