RE: getting text
- From: martyn 2 russell bt com
- To: johnson cyberbabies com, gtk-app-devel-list gnome org
- Subject: RE: getting text
- Date: Thu, 18 Sep 2003 10:12:38 +0100
i displayed a long text in the text widget with a text view using
gtk_text_view_get_buffer
and
gtk_text_buffer_set_text
how should i retrieve back the changed text in text widget
i tried out gtk_text_buffer_get_text..its not working??
When retrieving text, you need to use iterators, see here:
http://developer.gnome.org/doc/API/2.0/gtk/gtk-GtkTextIter.html
Iterators are used when retrieving the text, to do this you can get away
with:
GtkTextIter iter_start;
GtkTextIter iter_end;
gtk_text_buffer_get_bounds(GTK_TEXT_BUFFER(buffer), &iter_start,
&iter_end);
gtk_text_buffer_get_text(GTK_TEXT_BUFFER(buffer), &iter_start,
&iter_end, TRUE);
Regards,
Martyn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]