Re: Entry widget
- From: "Olexiy Avramchenko" <aolexiy gmail com>
- To: "Shyjumon N." <shyjumon n ttec soc-soft com>
- Cc: gtk-list gnome org
- Subject: Re: Entry widget
- Date: Tue, 31 Oct 2006 12:29:37 +0200
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]