Re: Getting label of a menu item



I created the menu items using 'gtk_menu_item_new_with_label' so I guess there should be a way to read the label. I don't know why it has to be so complicated, why not add a simple function to read the label as I think it is a very
common task.
What I did was to add a string to the menu item using 'g_object_set_data' but this seems to me as just adding more
complexity for something that should be done otherwise.

--
Ori Idan

Tom Liu wrote:

The menu item is just a container. You can pack any widget into the menu
item. So it may not have a label.
But since it is container, you can also use the container functions to
get the child widget(for your case, it may be the label widget).


-----Original Message-----
From: gtk-app-devel-list-admin gnome org [mailto:gtk-app-devel-list-
admin gnome org] On Behalf Of Ori Idan
Sent: Thursday, March 11, 2004 7:53 AM
To: gtk-app-devel-list gnome org
Subject: Getting label of a menu item

I would like to get the label of a menu item.
I tried searching the archives of the list but could not find code to
do
it.
It should be a simple function I guess but could not find it in the
reference manual.
Please give me full code since I am a complete newbe at GTK+

--
Ori Idan

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list






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