Re: Retrieve chars of a GtkText widget
- From: Owen Taylor <otaylor redhat com>
- To: Joachim Backes <backes rhrk uni-kl de>
- Cc: Gtk <gtk-list redhat com>
- Subject: Re: Retrieve chars of a GtkText widget
- Date: 03 Nov 1999 10:31:00 -0500
Joachim Backes <backes@rhrk.uni-kl.de> writes:
> How to retrieve the Text of a GtkText Widget? I found the macro GTK_TEXT_INDEX(t, index), but one
> problem arises: what happens if the given "index" is too large? Because I don't know the length
> of the Widget's contents, I have to loop with an increasing index.
> Is there a correct method?
- gtk_text_get_length() gives you the length.
An easy way to get the entire contents of the text widget, is
gtk_editable_get_chars (GTK_EDITABLE (text), 0, -1);
Where -1 means "to the end".
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]