Menu Check Items

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

 



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

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux