[10574] in The GTK GIMP ToolKit mailing list archive
[gtk-list] Re: Carriage Return/Line Feed in GTK Text Box
daemon@ATHENA.MIT.EDU (Lyndon Drake)
Tue Dec 1 15:52:36 1998
Date: Wed, 2 Dec 1998 09:51:41 +1300
From: Lyndon Drake <lyndon@stat.auckland.ac.nz>
To: gtk-list@redhat.com
In-Reply-To: <199812011519.KAA11699@mail.redhat.com>; from Crampton, Ray on Tue, Dec 01, 1998 at 10:19:37AM -0500
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
On Tue, Dec 01, 1998 at 10:19:37AM -0500, Crampton, Ray wrote:
> I am using a gtk text box in an application where I write characters one at
> a time as they are received over a network connection. Here's my
> gtk_insert_text line:
>
> gtk_text_insert(GTK_TEXT(text_box),NULL,NULL,NULL,buff,1);
>
> Here are some earlier declarations:
>
> char buff[5];
> GtkWidget *main_text_box;
> main_text_box = gtk_text_new (NULL,NULL);
>
> When I try to insert a carriage return / line feed nothing happens. Any help
> in how to handle this so that CR/LF acts "normally" would be greatly
> appreciated.
>
You could try emitting a "key_press_event" signal to the text box, with a
GDK_Return key code.
Lyndon
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null