Re: Capturing text from Gtktext widget,



mmm Zev,
I'm a bit afraid to admit this but..........
This freeing of memory is exactly what I keep forgetting all the time.
(LAZY???)

tnx for the tip.

MArtijn  

ZB wrote:

dont forget to g_free(buffer) or you will have a
memory leak
Zev.

--- Martijn Bos <bos kamp wxs nl> wrote:
Hi,
maybe you can use the function :

gchar * gtk_editable_get_chars(gtk_editable *, gint,
gint)

Like this in code:
buffer =
gtk_editable_get_char(GTK_EDITABLE(text-widget), s,
e);

This function returns a pointer of gchar with the
text of the text
widget. It starts reading at postion s. It will and
reading at position
e. If you enter a negative value at e it will read
all the text to the
end.

Best regards

Martijn

"Sreenidhi.B.G" wrote:

Hi,
can anyone tell me , how do I capture all the text
entered in the
GtkText Widget, and write it to a buffer.
-regards,
sreenidhi,

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org


http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org

http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1



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