Re: Text boxes and gtk_widget_realize()?
- From: Owen Taylor <otaylor redhat com>
- To: "Curtiss Howard" <po_boxx_823 hotmail com>
- Cc: gtk-list redhat com
- Subject: Re: Text boxes and gtk_widget_realize()?
- Date: 02 Aug 1998 01:10:05 -0400
"Curtiss Howard" <email@example.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.
] [Thread Prev