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

The second argument is "gpointer  user_data". What change should I make to
the second argument to get the pointer of textview, and where(only in
callback.c, or anywere else needed)?

On 7/8/08, Lukasz Gromotowicz <gromot at gmail.com> wrote:

first of all read here:
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 textView.


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/20080708/47cead34/attachment.html 

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