Re: [gtk-list] Gtk_Text question



The text widget needs to be show()'n or realized before you can insert
text into it - reversing the position of those two function calls should
do the trick...


--
Evan Lawrence

On Fri, 25 Sep 1998, Lixin Tang wrote:

> Hi, 
> 
> what's wrong with my following code when I try to put a string into a text
> widget? I got "** ERROR **: sigsegv caught" message when I ran it (not
> compiled it). Your help is appreciated! 
> 
> Lixin
> 
> ==================================================================
> ...
> 
> Gtk_Text* my_text = new Gtk_Text();
> 
> int i = 0;
> 
> // syntax: void insert_text(const gchar *new_text, gint new_text_length,
> //                          gint *position); of class Gtk_Editable
> 
> my_text->insert_text( "Hello", 5, &i );
> 
> my_text->show();
> 
> ...
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
> 
> 



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