Re: Delete a gtktextbuffer to fill it again

2010-12-03 Thread Ranjinianoop
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 .Plz help me.Thanks in advance

RE: Delete a gtktextbuffer to fill it again

2005-06-14 Thread Freddie Unpenstein
> I use gtk_text_buffer_delete this way: > if (textbuf != NULL) { > gtk_text_buffer_get_start_iter (textbuf,&start); > gtk_text_buffer_get_end_iter (textbuf,&end); > gtk_text_buffer_delete (textbuf,&start,&end); > } As an aside, there is a function that will get both iters at th

Re: Delete a gtktextbuffer to fill it again

2005-06-14 Thread Eduardo M KALINOWSKI
Colossus wrote: > Hi, > > I use gtk_text_buffer_delete this way: > > if (textbuf != NULL) > { > gtk_text_buffer_get_start_iter (textbuf,&start); > gtk_text_buffer_get_end_iter (textbuf,&end); > gtk_text_buffer_delete (textbuf,&start,&end); > } Have you tried using gtk_text_buffer_set_

Re: Delete a gtktextbuffer to fill it again

2005-06-14 Thread Muthiah Annamalai
Hello Giant{colossus}! --- Colossus <[EMAIL PROTECTED]> wrote: > I use gtk_text_buffer_delete this way: > > if (textbuf != NULL) > { > gtk_text_buffer_get_start_iter (textbuf,&start); > gtk_text_buffer_get_end_iter (textbuf,&end); > gtk_text_buffer_delete (textbuf,&start,&end);

Re: Delete a gtktextbuffer to fill it again

2005-06-14 Thread Colossus
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