Re: window stacking problem



On Fri, Aug 19, 2005 at 04:54:35PM -0500, Boncek, John wrote:
Using GTK 2.2.4 in an embedded app with fixed resolution, I have a
GtkFixedContainer with two children:

1.  a GtkDrawingArea containing some drawing.
2.  a GtkButton intended to overlay (1).

They are created in that order, so I would think the button would be on
top of the drawing, which was intended.  It is below the drawing even if I
do a gdk_window_raise on it.  If the drawing is removed you see it right
where it should be.  With the drawing there, the button does not appear
but still receives clicks in the proper area of the screen.  How can I
raise the button so it's visible?  I've tried gdk_window_raise,
gtk_widget_show, gdk_window_show, and a combination of gdk_window_hide
followed by gdk_window_show.  None work.  I will entertain ideas about
other ways to structure the widget hierarchy, but the idea of having a
button on top of a drawing is absolutely essential.  If a drawing area
were also a container I could just make the button a child of the drawing
area.

Well, there is a widget that is also a container: GtkLayout
(note if you draw on it, you have to draw on its bin_window,
not window).

Yeti


--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?



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