entrycompletion in gtkcomboboxentry



Hi all,

in a gtktreestore with 1 column I store names (textfields) in three
groups: group A, group B and group C resp. This store is being used as
the model for a gtkcomboboxentry. This widget shows up as expected:
correctly shows the three groups with the "expander icon" in front of
it, and expand into a submenu displaying the names belonging to the
group when the mouse is over the group name.

However, I also want to be able to select one of the names by typing
the name directly into the gtkentry. In addition, I want to use some
auto completion. I set up an entrycompletion on the entry. But when I
type some name, the popup with the possible completions will only show
3 entries: group A, group B and group C. Also, I see the "expander
icon" (what's it called?) in front of it. But this is not what I want:
I want a list of all matching names instead of group names.

I tried dozens of things but without succes so far. The last thing I
tried was to put some custom textrenderer in the completion like this:

renderer = gtk_cell_renderer_text_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (completion), renderer, TRUE);
gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (completion),
                                 renderer, "text",0 );
g_object_set(renderer,"is-expanded",TRUE,NULL);

Unfortunately, it doesn't work. Any suggestions?

thanks a lot.



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