Getting the label from gtk_radio_menu_item_new_with_label()
- From: Andy Kahn <ackahn netapp com>
- To: gtk-list redhat com
- Cc: Andy Kahn <ackahn netapp com>
- Subject: Getting the label from gtk_radio_menu_item_new_with_label()
- Date: Wed, 12 Apr 2000 15:41:14 -0700
I'm borrowing the code from testgtk.c which looks similar to the
following:
static GtkWidget *
build_option_menu(...)
{
...
omenu = gtk_option_menu_new ();
menu = gtk_menu_new ();
group = NULL;
for (i = 0; i < num_items; i++)
{
menu_item = gtk_radio_menu_item_new_with_label (group, labeltext);
gtk_signal_connect (GTK_OBJECT (menu_item), "activate",
(GtkSignalFunc) my_callback, data);
...
}
...
}
In the callback function, the first parameter should be the menu item
widget. That is:
void
my_callback(GtkWidget *wgt, gpointer cbdata)
{
...
}
"wgt" should point to the "menu_item" widget from up above.
My question is this: how can get at the label widget which is created
as part of the menu item from gtk_radio_menu_item_new_with_label() ?
any help would be appreciated,
--andy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]