Re: gtk-canvas trouble in stacking order !
- From: "Arjan J. Molenaar" <arjanmolenaar hetnet nl>
- To: Jean-Francois LECOMTE <lecomte litteral fr>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: gtk-canvas trouble in stacking order !
- Date: 18 Jan 2002 09:12:37 +0100
On Thu, 2002-01-17 at 19:33, Jean-Francois LECOMTE wrote:
> Hi there,
>
> i use a gtk-canvas version, not the gnome-canvas implementation and i
> observe the following trouble.
>
>
> In my gtk_canvas_group i put some object in following order
>
> 1) rectangle1
> 2) rectangle2
> 3) widget1
> 4) rectangle3
> 5) widget2
> 6) rectangle4
>
> When i make a redraw, i always observe widget items at the top.
> Stacking order isn't respected.
That's correct. The widgets are handled as child widgets of the canvas
(GtkLayout actually). If you create a CanvasWidget, a gtk_layout_put()
is done, which adds the widget to the layout's list of children. So if
the canvas is rendered, the canvas' background (=layout object) is drawn
first (which contains your rectangles) and after that the layouts
children are drawn (the widgets).
> I'm unable to push widgets item to the bottom !
>
> Did someone notices this pb, and is there any solution to solve this !
Maybe you can create a GtkCanvasWidget class that draws itself to an
invisible window or to a pixmap or something... The only way (in my
opinion) is to create a pixmap of the widget and draw that on the
GtkLayout. But I might be completely wrong...
Regards,
Arjan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]