Thanks, the problem has been resolved.
wasFrom: Andreas L?g <c00alg@xxxxxxxxx> To: jacky618 jacky618 <hhd618@xxxxxxxxxxx> Subject: Re: Why check menu item's response was blocked? Date: Wed, 11 Aug 2004 13:10:36 +0200 (MEST)
Hi It might help if you just use fprintf(stderr,"****\n"); instead of printf. I believe printf buffers its signs so they dont neccecerly appear at ones
//Andreas
On Wed, 11 Aug 2004, jacky618 jacky618 wrote:
> Hi,
>
> I have a trouble with me when using Gtk+ . In my program, a check menu
> used as following:was
>
> void on_menuitem_1_toggled(GtkCheckMenuItem *ckMnItem,
> gpointer user_data)
> {
> printf("***");
>
> if (GTK_CHECK_MENU_ITEM(ckMnItem)->active == TRUE)
> printf("###");
> else
> printf("@@@@");
> }
>
>
> menu1 = gtk_menu_new();
>
> menuitem_1 = gtk_check_menu_item_new_with_label("Linkage status"));
> gtk_signal_connect (GTK_OBJECT( menuitem_1), "toggled",
> (GtkSignalFunc) on_menuitem_1_toggled,
> menuitem_1);
>
> gtk_menu_append(GTK_MENU(menu1),menuitem_1);
> gtk_widget_show(menuitem_1);
>
> I hope when the check menu item was selected, it will print "***###"
> immediately,and "***@@@" when unselected. However, it can not print
> immediately after the menu item was clicked.And until the main window
> closed, the strings will appear. > > With regards, > Brook. > > _________________________________________________________________ > 免费下载 MSN Explorer: http://explorer.msn.com/lccn/ > > _______________________________________________ > > gtk-list@xxxxxxxxx > http://mail.gnome.org/mailman/listinfo/gtk-list >
------------------------------------------------------------------------------
------------------------------------------------------------------------------
******************************** * Andreas L?g * * Stipendiegr?d 12B - 208 * * 903 35 UME? * * * * Tel. 090-193763 * * Mob. 070-6822339 * * ICQ#. 77955851 * ********************************
_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com
_______________________________________________ gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list