[plt-scheme] can't get height right when making a widget for mred
Thanks for the amazingly quick and completely correct reply.
Cheers
Stephen
On 9/21/07, Matthew Flatt <mflatt at cs.utah.edu> wrote:
>
> At Fri, 21 Sep 2007 14:35:04 +0100, "Stephen De Gabrielle" wrote:
> > I'm trying my hand at making a simple widget.
> >
> > I've done something wrong and it is twice as high as it should be.
> >
> > Please look at my code below and let me know where I have gone wrong.
>
> You are creating four widgets:
>
> * A frame that contains
>
> * A pane (of min height 200)
>
> * A pane that contains
>
> * A canvas (of min height 200)
>
> Since the canvas is not nested in the first pane, the frame is
> constrained to be 400 pixels tall.
>
> I think you probably meant to make the canvas a child of the first
> pane, instead of having two panes. To do that, move the
> `super-instantiate' for the enclosing pane% class to before the
> creation of the canvas% instance, and get rid of the `pane' definition,
> and change the `parent' canvas% argument from `pane' to `this'.
>
> Matthew
>
>
--
Cheers,
Stephen
--
Stephen De Gabrielle
s.degabrielle at ucl.ac.uk
Telephone +44 (0)20 7679 5242 (x45242)
Mobile 079 851 890 45
http://www.uclic.ucl.ac.uk/annb/MaSI.html
University College London Interaction Centre
Remax House - 31/32 Alfred Place
London - WC1E 7DP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070921/ed6aa1b0/attachment.html>