Re: Setting treeview column width



On Thu, 30 Aug 2007, Binary Chen wrote:

With following code, I still can't make a fixed sized treeview column,
the column's width is large even after I have set its size, whats wrong
with it? Any other thing affect it?

        column = gtk_tree_view_column_new();
        gtk_tree_view_column_set_title(column, _("Name"));
        gtk_tree_view_column_set_fixed_width(column, 3);
        gtk_tree_view_column_set_sizing(column,
GTK_TREE_VIEW_COLUMN_FIXED);

I believe you want to swap the last 2 lines.  
gtk_tree_view_column_set_fixed_width() doesn't do anything unless
the column has sizing type GTK_TREE_VIEW_COLUMN_FIXED, which it 
doesn't at that point in execution.

Allin Cottrell



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