[Gtk-sharp-list] treeview header size
John Luke
jluke@users.sourceforge.net
Fri, 23 Apr 2004 15:53:03 -0400
On Thu, 2004-04-22 at 14:17 +0300, Andrei Ivanov wrote:
> Hello,
> I've created a treeview and I'm trying to alter the size of its header.
>
> The only way that I found about how to get a reference to the buttons
> that create the header is like this:
>
> CellRendererText renderer = new CellRendererText();
> TreeViewColumn column = new TreeViewColumn("Name", renderer, "text", 0);
>
> column.Widget = new Gtk.Label("aa");
> column.Widget.Show();
> treeview1.AppendColumn(column);
>
> //column.Widget -> Label
> //column.Widget.Parent -> Alignment
> //column.Widget.Parent.Parent -> HBox
>
> Gtk.Button header = (Gtk.Button)column.Widget.Parent.Parent.Parent;
>
> My problem is that I don't know how to alter the size of that button.
>
> In glade, the common properties tab of a normal button include width and
> height, but the header button doesn't seem to have them.
>
TreeViewColumn has FixedWidth, MaxWidth, and MinWidth properties, is
that what you want? Or if you add the CellRenderer with PackStart to the
column you can specify if you want it to expand or not.
This might be useful if it helps to have examples in C of the TreeView:
http://scentric.net/tutorial/