Re: GtkTreeView and Family



Jay Bloodworth <jbloodworth sc rr com> writes:

I have a couple of questions about the GtkTreeView widget:

1) Can anyone suggest a way to implement columns whose widths stay in
fixed proportions e.g. 70%/20%/10% of the total width?  I've had some
luck getting the width from the allocation and using arithmetic and
setting fixed width sizing to size the columns myself, but I'm wondering
if there is a better way.  Plus, I can't seem to find the right signal
to connect to to handle a resize - nothing I try gets run (FWIW my
treeview is stuffed in a scrolledwindow).

This isn't really doable right now.  Your approach should be basically
the only way to do this.  you can listen to a size_allocate on the
tree_view in order to resize yourself.  

2) I think I know how to do this but while I'm here I'll ask: How do you
set the alignment of the text in a column - not the label in the header
button, but the column data itself?

g_object_set (cell, "xalign", 1.0, NULL);
etc.

Thanks,
-Jonathan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]