If you make sure that text1 is NULL terminated:
gtk_text_insert(text1,NULL,NULL,NULL,texto, strlen(text1) );
I don't have the software here to test it, but my memory can't be that
bad :-)
Erlend.
Ricardo Kohler Costa wrote:
>
> I have a little problem and I'm sure someone can help me.
>
> I am trying to insert a text from a entry in a text(box), but I have to
> say the lenght of the text to be inserted. How can I get it???
>
> Problem:
> void on_btn_Ok_pressed (GtkButton *button, gpointer user_data)
> {
> char *texto;
>
> entry1 = GTK_ENTRY(lookup_widget((button),"entry1"));
> text1 = GTK_TEXT(lookup_widget((button),"box_Nome"));
>
> texto = (gtk_entry_get_text(entry1));
> gtk_text_insert(text1,NULL,NULL,NULL,texto, ????????????);
> gtk_entry_set_text(entry1,"");
>
> }
>
> Thanks I apreciate your help and time.
>
> +---------------------------------------------------------------------+
> To unsubscribe from this list, send a message to [EMAIL PROTECTED]
> with the line "unsubscribe glade-devel" in the body of the message.
+---------------------------------------------------------------------+
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the line "unsubscribe glade-devel" in the body of the message.