put a button on a menuitem, when click mouse button on the menuitem, it seems that button does not receive it
- From: "cheng bo" <chengbobo831005 gmail com>
- To: gtk-app-devel-list gnome org
- Subject: put a button on a menuitem, when click mouse button on the menuitem, it seems that button does not receive it
- Date: Tue, 4 Apr 2006 10:34:15 +0800
code snipper:
GtkMenu * menu = gtk_menu_new( ) ;
GtkMenuItem * item = gtk_menu_item_new( );
GtkWideget * b = gtk_button_new_with_label("asdada");
gtk_containter_add((GtkContainer*)item, b ) ;
gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
g_signal_connect(G_OBJECT(b), "entry", G_CALLBACK(cb_function), NULL);
after that, catch the button_release_event to make sure that menu will
not disapper ..
but it seems that button b does not emit the entry signal,cb_function
is not called ,somebody give me some guides?
thanks
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]