Re: clearing a text buffer



On Tue, May 20, 2003 at 08:57:40PM -0400, Noah Levitt wrote:
On Tue, May 20, 2003 at 16:41:29 -0400, Rajarshi Guha wrote:

Right now my problem is how can I clear a text view? 

  gtk_text_buffer_set_text (buffer, "", -1);

My question is: how do I get a text iterator to the beginning and end of
a bufffer?

  gtk_text_buffer_get_start_iter ()
  gtk_text_buffer_get_end_iter ()


Also there's gtk_text_buffer_get_bounds(buffer, &start, &end)

Rajarshi - see
http://developer.gnome.org/doc/API/2.0/gtk/TextWidget.html
http://developer.gnome.org/doc/API/2.0/gtk/GtkTextBuffer.html
http://developer.gnome.org/doc/API/2.0/gtk/GtkTextView.html

Also see gtk-demo and testtext in the GTK distribution.

Havoc



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