Re: [gtk-list] Text Fields

>I was wondering if there was a way to get the contents of a text field,
>when all you use is GtkWidget *text for about 5 text fields.
>Or should I just use:
>GtkWidget *text1;
>GtkWidget *text2;
>GtkWidget *text3;
>and so on...
As GtkText is a "subclass" of GtkEditable, you should use:

    gchar *ptr = gtk_editable_get_chars(GTK_EDITABLE(text1), ....)

(I don't remember the other parameters, have a look at the header files).


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