RE: Delete a gtktextbuffer to fill it again

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 the same time.  (get_bounds or something), and 
you could just set the buffer text to "" (not sure if NULL will work instead of an empty string).


Join Excite! -
The most personalized portal on the Web!

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