Re: [gtk-list] Text boxes and gtk_widget_realize()?



Curtiss Howard wrote:
> 
> I was attempting to insert text into a text box when the program crashed
> with an error about realizing the text box widget.  However, when I did
> that, it created a separate window for the text box... not the effect I
> was looking for.  Is there something I'm doing wrong here?
> 
> Text = gtk_text_new (NULL, NULL);
> 
> .
> . pack, etc.
> .
> 
> gtk_widget_realize (Text);
> 
> gtk_text_insert (GTK_TEXT (Text), NULL, NULL, NULL, "test", -1);
> 
> This _WORKS_ but not how I want it to.  It'll create another window.
> 
> Any suggestions?

The realize should work. I've got something similar with gtk-- where
realize didn't work. To obtain what I've wanted, I was forced to treat
the show event and insert the text in the attached callback. 

Ionutz



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