[racket] racket/gui: changing the background color

From: David Nelson (davidcnelson at gmail.com)
Date: Mon Aug 25 12:34:47 EDT 2014

On Sun, Aug 24, 2014 at 8:49 AM, Matthew Flatt <mflatt at cs.utah.edu> wrote:

> 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.

>  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.

Thank you. The consistency with the rest of the classes makes it a bit

> 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.

Trying to create a cross platform framework that uses native controls is
quite a challenge. I was surprised how well placing controls over a canvas
worked on OS X. On the other hand the results on Linux showed just how
challenging this is. For example, transparent canvas backgrounds worked
fine on OS X, but on Linux (in a VM), it filled the background with white.

Thanks to all who were involved for a useful GUI framework. When I started
work on our first generation program and test system several years ago, I
dreaded the thought of having to write an X program for the UI. A friend
directed me to Racket. My previous job was programming in Common Lisp, so
picking up Racket was rather easy. Having the gui framework made it rather
easy to throw together the UI so I could concentrate on creating the main
programming state machine and the other threads to handle the various parts
of the system.

-- David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140825/abc5a5b4/attachment.html>

Posted on the users mailing list.