[10123] in The GTK GIMP ToolKit mailing list archive
[gtk-list] Re: text-entry retrieval
daemon@ATHENA.MIT.EDU (Tom Vogt)
Sun Nov 15 10:12:41 1998
Date: Sun, 15 Nov 1998 14:25:47 +0100
From: Tom Vogt <tom@lemuria.org>
To: gtk-list@redhat.com
In-Reply-To: <m3u301n6bq.fsf@term1.dccs.com.au>; from Dave Cole on Sun, Nov 15, 1998 at 11:32:57AM +1100
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
Dave Cole <dave@dccs.com.au> wrote:
> I am not sure why you are having problems with the GtkEntry callback.
> I use it in the way you describe, and I am not having any problems.
looks like I just got the wrong signal. instead of using "changed", I went
with the "focus_out_event" signal. I got the stuff running now with the
following code fragments (in case someone finds this useful or wants to put
it into the faq):
creation of widget:
gtk_signal_connect (GTK_OBJECT (entry21), "changed",
GTK_SIGNAL_FUNC (text_change), variable);
callback:
void text_change (GtkWidget *textfield, gpointer target)
{
strcpy((char*)target,(char*)gtk_entry_get_text(GTK_ENTRY(textfield)));
}
--
why I prefer Linux:
tom@lemuria> uptime
2:20pm up 215 days, 17:54h, 3 users, load average: 0.00, 0.00, 0.00
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null