[racket] Fullscreen frame and keyboard focus questions

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sun Oct 23 11:51:04 EDT 2011

It might be best to create your own subclass of panel% that expects to
have two children (a canvas% for drawing the background and an
editor-canvas% for the text% object) that centers the editor-canvas%
over the canvas%.

Robby

On Sun, Oct 23, 2011 at 10:17 AM, Erich Rast <erich at snafu.de> wrote:
> Hi,
>
> I've got a bit of a strange requirement. What I need: a text% with
> corresponding editor canvas centered on the screen filled with a
> background color or image. Various tools and "overlays" might show up on
> the background around the editor.
>
> Method 1: Make a frame% fullscreen and put vertical and horizontal
> panels around the editor canvas. This works but has a few disadvantages
> (imagine, e.g., that the background should be a continuous image).
>
> Method 2: Make two frames, one fullscreen for the background and one for
> the editor canvas, where the latter has style '(float no-caption). The
> result is very much like I want it (especially since the menu is in the
> right place), but unfortunately the text% instance never gets the
> keyboard focus. Is there a "hack" to force keyboard focus to the editor
> embedded in a floating frame? (If it's not set to float the Gnome panel
> on Linux will show up even if the background window is right behind it.)
>
> Or, should I rather stick with the first method?
>
> Or, is there a way to paint the background of a frame% directly or
> overlay other controls over a canvas?
>
> Any solution needs to work on all platforms.
>
>
> Best,
>
> Erich
>
>
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>



Posted on the users mailing list.