Re: Text boxes and gtk_widget_realize()?




"Curtiss Howard" <po_boxx_823@hotmail.com> writes:

> 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?

You need to make sure the Text widget is added to a parent that
is added to a parent ... that is added to a GtkWindow, when you
call gtk_widget_realize(), or you'll see the effect you are seeing.

Regards,
                                        Owen



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