Re: Get text from a textbox GTK+
- From: Gert <gs2 node17530 a2000 nl>
- To: claes cassel <claes_cassel hotmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Get text from a textbox GTK+
- Date: Thu, 25 Jan 2001 00:08:59 +0100
On Wed, Jan 24, 2001 at 05:34:36PM -0000, claes cassel wrote:
I cant find any documentation about getting text from a textbox,
if that doesnt work .. what widget should i use .. clist ?
I also want to save the text contained in the textbox to a file.
If you have got the time .. an example would be nice :)
I assume you meat the GtkText widget, functions you want are:
gchar* gtk_editable_get_chars (GtkEditable *editable,
gint start_pos,
gint end_pos);
guint gtk_text_get_length (GtkText *text);
so, to get all text out of your text widget use:
text = gtk_editable_get_chars(GTK_EDITABLE(widget), 0,
gtk_text_get_length(GTK_TEXT(widget)));
(text is a newly allocated string)
Please help
//Magnus
Gert
--
begin LOVE-LETTER-FOR-YOU.TXT.vbs
I'm a signature virus. Copy me!
end
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]