GtkComboBox can show tree structure? how?
- From: Olivier Sessink <lists olivier pk wau nl>
- To: gtk-app-devel-list gnome org
- Subject: GtkComboBox can show tree structure? how?
- Date: Wed, 26 Jan 2005 21:00:00 +0100
According to the docs "The tree model holding the valid choices is not
restricted to a flat list, it can be a real tree, and the popup will
reflect the tree structure."
I have data in a treestore, and it is indeed a tree structure. But all
data show up as one list, no nesting, nu submenu, nothing. What it is I
should add to this code?
thanks,
Olivier
GtkCellRenderer *renderer;
fb2->dirmenu_v = gtk_combo_box_new_with_model(fb2->dirmenu_filter);
renderer = gtk_cell_renderer_pixbuf_new();
gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(fb2->dirmenu_v),renderer,FALSE);
gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(fb2->dirmenu_v), renderer
, "pixbuf", PIXMAP_COLUMN
, "pixbuf_expander_closed", PIXMAP_COLUMN
, "pixbuf_expander_open", PIXMAP_COLUMN
, NULL);
renderer = gtk_cell_renderer_text_new();
gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(fb2->dirmenu_v),renderer, TRUE);
gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(fb2->dirmenu_v), renderer
, "text", FILENAME_COLUMN
, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]