GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Columns headers do not stay centered when becoming visible

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
alketi
Familiar Face


Joined: 10 Mar 2010
Posts: 22

PostPosted: Wed Mar 10, 2010 4:52 pm    Post subject: Columns headers do not stay centered when becoming visible Reply with quote

Hi all,

I have an application that uses a Tree View to create 16 columns. The first 8 columns are identical (same data, same header labels) to the second 8 columns.

To begin the app, the first 8 columns are visible, while the second 8 are invisible. With the first 8 columns, all headers are perfectly CENTERED, as I want.

When I make the first 8 invisible and the second 8 visible, the column headers all shift over by one or two character and are no longer centered.(!) Why?

If I go ahead and swap the visibility again, the first 8 columns headers are now also shifted by that one or two character amount.

Is this a bug? Or is there a simple way to keep column headers centered (justified) when switching their visibility?

My tree view setup is shown below.

Thanks in advance.

Code: (Plaintext)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
    GtkTreeViewColumn         *col;
    GtkCellRenderer            *renderer;

    renderer = gtk_cell_renderer_text_new ();

    col = gtk_tree_view_column_new_with_attributes     (title, renderer, "text", columnID, NULL);
    gtk_tree_view_column_set_min_width                (col, 75);
    gtk_tree_view_column_set_alignment                (col, 0.5);
    gtk_tree_view_column_set_title                    (col, title);
    gtk_tree_view_column_set_clickable                (col, TRUE);
    gtk_tree_view_column_set_resizable                (col, TRUE);
    gtk_tree_view_column_set_sort_column_id            (col, columnID);
    gtk_tree_view_column_set_reorderable            (col, TRUE);

    gtk_tree_view_append_column (GTK_TREE_VIEW(view), col);
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP