[plt-scheme] Styling MrEd GUI components
At Sun, 30 Mar 2008 00:49:16 -0400, "Ben Simon" wrote:
> On Mon, Mar 10, 2008 at 9:22 AM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
>
> > At Sun, 9 Mar 2008 23:45:03 -0400, "Ben Simon" wrote:
> > > How do I style MrEd components? That is, how could I make a button red,
> > or a
> > > border green? I see where I can make use of different fonts, but that's
> > > about all I see in terms of controlling the Look & Feel of the
> > components.
> > [...useful comments trimmed]
> >
>
>
> >
> > More generally, you can derive a sub-class of `canvas%' and draw
> > anything as a control.
> >
>
> There doesn't happen to be a way to use this approach, and somehow embed a
> container like a vertical-panel% in the resulting canvas%, is there?
No. That's something I've wanted to add, but I've never found the time
to make it work.
> The idea being that I might make a component that uses a canvas to draw a
> green border, and then embed other GUI components (say, a series of buttons)
> in this newly drawn area.
I can think of a hack: create four canvases, place one on each side of
the panel, and draw a border using all four canvases.
Matthew