Re: How to access gtktreeview header widgets ?





I am having treeview with visible headers.
What I need to do is to remove GTK_CAN_FOCUS flag from the header button
widgets
(GTK_WIDGET_UNSET_FLAGS(view, GTK_CAN_FOCUS)) .

My problem is that I don't know how to access header widget(s).
Is this possible ?

You can try with the 'widget' property of GtkTreeViewColumn like in the following example at which I put a GtkCheckButton in the column header.

   /* create column views */
   num_column    = gtk_tree_view_column_new_with_attributes("Numeral",
                                                          text_renderer,
"text", INT_COLUMN,
                                                          NULL);
GtkCheckButton *check_button; check_button = g_object_new(GTK_TYPE_CHECK_BUTTON, "label", "_Include",
                                  "use-underline", TRUE,
                                  "visible", TRUE,
                                  NULL);

   g_object_set(num_column,
                "widget", check_button,
                NULL);

Hope this helps.

Hazael Maldonado




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