[racket] racket/gui: changing the background color
At Fri, 22 Aug 2014 16:28:50 -0500, David Nelson wrote:
> Why don't pane% and panel% honor the stretchable-width and
> stretchable-height properties of their children.
The `pane%` and `panel%` classes weren't meant to be instantiated
directly, but as base classes to be extended with a useful placement
strategy...
> Setting the minimum width and height the same for all children is OK as a
> starting point, but if the window grows and you want that space to grow
> too, the children are not currently stretched out. I ended up creating a
> custom pane% that overrides place-children, but it seems the default
> implementation could do this.
I didn't think of this as useful, because it would leave children
overlapping, and overlapping children generally don't display well.
In the case that you'll show only one child at a time, though, I agree
that the default you suggest seems sensible and useful. I've pushed
that change.
> 2) I want to arrange a canvas as a background behind other objects. After
> playing with this, the only other things that seem to reliably work in the
> foreground are other canvases so I understand this would not be a typical
> use.
Right. I've tried before and not succeeded in providing better support
for drawing the background behind controls. I forget exactly why it
doesn't work out, but it has to do with the way platform-specific
toolkits draw controls. I think that putting a canvas with 'transparent
over another canvas should work, but there may be Z-order issues, still.