Re: gtk_text_entry



On Fri, 2005-05-20 at 10:30, Alan M. Evans wrote:

gboolean onEnter(GtkWidget *widget, gpointer *data) {
    /* called when user presses Enter */
    const gchar *s = gtk_entry_get_text(data->entry);
    /* Do something with the text here,
       then to clear the entry do... */
    gtk_entry_set_text(data->entry,"");
    return TRUE;
}

Sorry, that's not entirely correct. I just copy/pasted from a much
larger project of mine. Replace "data->entry" above with
"GTK_ENTRY(widget)".






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