[racket] Graphical Toolkit change question

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Feb 17 22:08:10 EST 2011

At Thu, 17 Feb 2011 23:44:51 +0100, "Christophe Vandenberghe" wrote:
> I have been using the Graphical Interface toolkit to create a GUI for some
> kind of game. Things were starting to take shape, but with the new release
> and rewrite of the GUI I seem to have a little problem. When adding children
> to a panel container (didn't check for other containers), the first child is
> always shown on top. I.e. children are added behind each other. 
> 
> I have a background that takes the size of the whole panel and if I add
> anything after that it's shown behind that background, as when before the
> release it would just show in front of it. Is this an intended behavior?

We've never tried to pin down the behavior of overlapping children in a
panel, and it varies among platforms. Actually, we tried long ago to
make the order consistent, and there were too many problems on some
platforms.

I think those old obstacles are gone in the new implementation, so
maybe we can pin this down and/or provide methods to control the order.
I'll look into it.

Meanwhile, I'm not sure what to suggest. If you need things to work on
one particular platform, then you might be able to use the `get-handle'
method and call a platform-specific function in the native toolbox (via
the FFI) to adjust the widget Z-order.



Posted on the users mailing list.