Re: [gtk-list] Re: text-entry retrieval



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



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