Re: how to add a ComboBox into toolbar?
- From: "Shuduo Sang" <sangshuduo gmail com>
- To: "Mike Massonnet" <mmassonnet gmail com>
- Cc: gtk-list gnome org
- Subject: Re: how to add a ComboBox into toolbar?
- Date: Fri, 12 Sep 2008 16:57:50 +0800
On Fri, Sep 12, 2008 at 4:32 PM, Mike Massonnet <mmassonnet gmail com> wrote:
> Le Fri, 12 Sep 2008 13:49:14 +0800,
> "Shuduo Sang" <sangshuduo gmail com> a écrit :
>> I'd like to add a GtkComboBox into a toolbar, but I can't see it even
>> no error reported.
>> My code is following,
>> GtkWidget *combo;
>> GList *items = NULL;
>> items = g_list_append(items, "aaa");
>> items = g_list_append(items, "bbb");
>> combo = gtk_combo_new();
>> gtk_combo_set_popdown_strings(GTK_COMBO(combo), items);
>> gtk_toolbar_insert(GTK_BOOLBAR(toolbar), combo, 0);
> There you should do
> item = gtk_tool_item_new();
> gtk_container_add (GTK_CONTAINER (item), toolbar);
> something like this.
hmm, I tried another way to do that and now it works.
I added a hbox and add both toolbar and combo box in hbox as its sub components.
I also tried your way. But i did not see combo show up. I am not sure
whether I missed something.
Whatever thanks for ur help. :)
>> I googled GtkComboBox example code but failed.
>> Could anyone give me a hit on this?
>> Very appreciated for your help.
> gtk-list mailing list
> gtk-list gnome org
] [Thread Prev