Solved: How to make a gtktreeview column flexible?


in have solved this problem. Here's the answer for reference:

Instead of using gtk_tree_view_insert_column_with_attributes to insert
a column, one might use seperate calls to  gtk_tree_view_column_new_with_attributes
and gtk_tree_view_insert_column as this give us an explicit reference to
the column. Thus one can use gtk_tree_view_column_set_expand(TRUE)
on that column and voila ... the column scales nicely with the window width.


Am Freitag 25 April 2008 schrieb Till Harbaum / Lists:

i have a gtktreeview filling the complete width of a window. Now i want the 
view to always use the full width. I therefore want the middle column (a text
column) to be flexible. I want it to be as wide as possible for any given window
width. So if you make the window wider i want this column to become wider.

If i just enable ellipsis in the columns text renderer the column gets very 
small and only a fraction of the window width is used. If i make it a fixed 
width it's exactly that: fixed width.

How do i make the column always use a much space as possible but never
more than available?

gtk-app-devel-list mailing list
gtk-app-devel-list gnome org

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