[racket] Graphical Toolkit change question

From: Christophe Vandenberghe (chvndb at gmail.com)
Date: Fri Feb 18 05:10:03 EST 2011

Thanks for the reply, but going through that process would be to troublesome and it needs to be platform independent. In the mean time I just changed the order in which the children are added to suit the current implementation. Not a very clean solution, but will do for now as I am still hoping transparency for panels will come into play in further releases and then I can rewrite my GUI anyway. 

I also noticed that checkboxes with labels now both show the label and the checkbox as where it should only show the checkbox.

Cheers

-----Original Message-----
From: Matthew Flatt [mailto:mflatt at cs.utah.edu] 
Sent: vrijdag 18 februari 2011 4:08
To: Christophe Vandenberghe
Cc: users at racket-lang.org
Subject: Re: [racket] Graphical Toolkit change question

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.