Setting a menu item label
- From: Hyrum Wright <hyrum_wright byu edu>
- To: gtk-app-devel-list gnome org
- Subject: Setting a menu item label
- Date: Mon, 25 Aug 2003 14:53:13 -0600
Howdy.
I've got several menu items that I need to set dynamically. I create
thus:
GtkWidget *menu_item;
menu_item = gtk_menu_item_new_with_label ("Label 1");
Later, I try to change them like so:
gtk_label_set_text (GTK_LABEL (gtk_bin_get_child (GTK_BIN
(menu_item))));
This, however, results in a seg fault. Upon further investigation, I
have discovered that the value returned by the call to gtk_bin_get_child
is NULL. My understanding, however, is that the label is the child of a
menu item. What would be the best way to change the label on this menu
item.
Thanks,
Hyrum
--
Need an Open Source Genealogy tool? Help write one!
http://openancestry.sourceforge.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]