Re: Delete a gtktextbuffer to fill it again




Hi, m very new to this linux and GTK, so can u please help me in displaying
continuous data coming from serial port into a text window. Im nt getting
how to clean the GtkTextBuffer every time n display the updated data. my
serial buffer reads 2048 bytes at a time .Plzzzzz help me.Thanks in advance


Colossus wrote:

Colossus wrote:
I fill the text gtk_text_buffer this way:
if (line != NULL) gtk_text_buffer_insert(textbuf, &enditer, line, 
strlen( line ) );

As it always happens after sending this email to the list I got the
solution: I forgot to call
gtk_text_buffer_get_start_iter(textbuf, &enditer); after deleting the
gtk_text_buffer because the iterators are changed after the call to
gt_text_buffer_delete().

Sorry,
-- 
Colossus

Cpsed, a Linux OpenGL 3D scene editor
http://cpsed.sourceforge.net/

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



-- 
View this message in context: 
http://old.nabble.com/Delete-a-gtktextbuffer-to-fill-it-again-tp196762p30365539.html
Sent from the Gtk+ - Apps Dev mailing list archive at Nabble.com.




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