Re: interactive buttons inside treeview headings
- From: Guy Rouillier <guyr-ml1 burntmail com>
- To: gtk-app-devel-list gnome org
- Subject: Re: interactive buttons inside treeview headings
- Date: Tue, 11 Apr 2006 00:00:19 -0400
Stefan Kost wrote:
hi list,
I've added a couple of (toggle)-buttons and a label in a box into each
of my treeview headers. They are shown properly. I can also modify them
programatically (toggle).
My problem is, that I can't click them. Honestly I have no idea how to
debug this. Any idea?
I'm not sure I understand your code, in particular what you mean by
"added a copule buttons and a label in a box into each of my treeview
headers." The GtkTreeView widget provides a clickable header for you.
Where are you putting your "button and label in a box"?
At any rate, if you are using the standard GtkTreeView, here are the
statements you need to get a clickable header that sorts:
GtkTreeViewColumn *clmn = gtk_tree_view_column_new();
gtk_tree_view_column_set_title( clmn, "Integer");
gtk_tree_view_column_set_resizable( clmn, TRUE);
gtk_tree_view_column_set_reorderable( clmn, TRUE);
gtk_tree_view_column_set_sort_column_id( clmn, INT_COLUMN );
gtk_tree_view_column_set_sort_indicator( clmn, TRUE);
GtkCellRenderer *rndr = gtk_cell_renderer_text_new();
gtk_tree_view_column_pack_start( clmn, rndr, FALSE);
gtk_tree_view_column_set_attributes(clmn, rndr, "text", INT_COLUMN, NULL);
gtk_tree_view_column_set_visible( clmn, TRUE);
--
Guy Rouillier
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]