Re: Entry widget

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

 



Hello,
If I understand correctly (you want to get an entry content on button
click) you have to do the following in your callback_card() function:
1. Remove gtk_widget_destroy callback on "clicked" signal.
2. Connect your own callback.

Like this:
static void
my_callback (GtkWidget *button, GtkWidget *entry)
{
   g_print ("Entry content: %s\n", gtk_entry_get_text (GTK_ENTRY (entry)));
   enter_callback (NULL, entry);
   gtk_main_quit ();
}

/* put this line instead of g_signal_connect_swapped */
g_signal_connect (button, "clicked", G_CALLBACK (my_callback), entry);

PS: please read all tutorials you can find on GTK+ and look at every
code sample in GTK+ tarball.

  Olexiy
_______________________________________________
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