Re: GtkTreeViewColumn width




Try switching the sizing to what is needed. Something like

...
    gint combo_id=gtk_combo_box_get_active(combo);
    if(combo_id==0)
      {
        g_print("%i\n", gtk_tree_view_column_get_width(column2));
        gtk_tree_view_column_set_sizing(GTK_TREE_VIEW_COLUMN(column2), GTK_TREE_VIEW_COLUMN_FIXED);
        gtk_tree_view_column_set_fixed_width(GTK_TREE_VIEW_COLUMN(column2), 25);
        gtk_tree_view_column_set_sizing(GTK_TREE_VIEW_COLUMN(column2), GTK_TREE_VIEW_COLUMN_AUTOSIZE);
        gtk_tree_view_column_set_resizable(GTK_TREE_VIEW_COLUMN(column2), TRUE);
      }
...

Then when you start the program, get the saved values, set as fixed and then switch to autosize.

Eric


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