[Gtk-sharp-list] how to obtain height of treeview/treeviewcolumn?
Matej Mihalech
matejmihalech at yahoo.com
Sat Apr 7 12:08:33 UTC 2012
Hi everyone!
How can I obtain height of treeview/treeviewcolumn, please? I have simple code with layout (inside is big treeview) and vertical scrollbar in the table. When I set small height of layout, I do not see all items of treeview and when I set it big, I see whole table with empty space at the bottom of layout. Is it possible to set layout, that it will have exactly same height like treeview or the biggest from treeviewcolumns ?
Thanks in advance.
A piece of code:
tree = new Gtk.TreeView();
vadjustment = new Gtk.Adjustment(0, 0, 0, 0, 0, 0);
vscrollbar = new Gtk.VScrollbar(vadjustment);
Lyout layout = new Layout(null, vadjustment);
layout.Put(tree, 0, 0);
Table table = new Table(1, 2, false);
table.Attach(layout, 0, 1, 0, 1, Gtk.AttachOptions.Expand|Gtk.AttachOptions.Fill, Gtk.AttachOptions.Expand|Gtk.AttachOptions.Fill, 0, 0);
table.Attach(vscrollbar, 1, 2, 0, 1, Gtk.AttachOptions.Shrink, Gtk.AttachOptions.Shrink|Gtk.AttachOptions.Fill, 0, 0);
box.PackStart (table, true, true, 4);
vbox1.Add(box);
...
TreeViewColumn first = new TreeViewColumn();
first.Title=h1;
Gtk.CellRendererText first_name_cell = new Gtk.CellRendererText ();
first.PackStart(prvy_name_cell, true);
first_name_cell.Width=20;
...
tree.AppendColumn (first);
layout.SetSize(800, ???);
Matej
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20120407/b78d4ee1/attachment.html>
More information about the Gtk-sharp-list
mailing list