Menu Check Items
- From: "kartikay malhotra" <kartikay malhotra gmail com>
- To: gtk-list gnome org
- Subject: Menu Check Items
- Date: Mon, 21 Jan 2008 16:59:32 +0530
Hi Friends
I am preparing a menu, using gtk_menu_new(), gtk_menu_item_new_with_label(), ...
The problem I'm facing in in a submenu. I must show one of two items as checked. Here is the code:
GtkWidget *hello;
child = gtk_menu_item_new_with_label("One");
gtk_menu_insert(submenu, child, 0);
g_signal_connect(G_OBJECT(child), "activate", G_CALLBACK(menu_callback4), (gpointer)child);
child = gtk_menu_item_new_with_label("Two");
gtk_menu_insert(submenu, child, 1);
g_signal_connect(G_OBJECT(child), "activate", G_CALLBACK(menu_callback5), (gpointer)child);
hello = gtk_check_menu_item_new_with_label("One"); <-- Is this wrong
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(hello), TRUE);
I get the submenu correctly. But I do not get the checked items. Why is this so?
Thanks
Best Regards
Er. Kartikay Malhotra
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]