[Glade-users] how can I display an entire text file in Gtktext widget?

first of all read here: http://library.gnome.org/devel/gtk/2.6/GtkText.html
It says the GtkText is deprecated... instead it use GtkTextView. Then having
a pointer to GtkTextView use
get its buffer. You must load whatever you want to display to this

When you define the callback function you can add a pointer to any structure
/ object you want (last parameter of the callback). Pass a pointer to your


2008/7/7 vishudh ps <vishudh at gmail.com>:

I am new to glade and trying to create an editor in glade.So, I want to
change the content of a Gtktext widget with a text file when a button is
clicked.Both the text and button are children of diffrent windows. The
problem is, I cannot access the text widget from the callback function of
the button.what is the solution to get the text widget on "clicked" callback
of the button? I tried with global variables, But make returns error:
"gtk_text_insert: assertion 'GTK_IS_TEXT(text)' failed".
Please help me to insert text in to the text widget. Thanks in advance.

Glade-users maillist  -  Glade-users at lists.ximian.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20080707/2705b44e/attachment.html 

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