[plt-scheme] Window resize in world programs

From: Carl Eastlund (carl.eastlund at gmail.com)
Date: Wed Oct 28 14:33:30 EDT 2009

On Wed, Oct 28, 2009 at 2:27 PM, Jordan Johnson <jmj at fellowhuman.com> wrote:
> All,
>
> A question from my class: is there any way to resize the window in a world
> program?  Example situation:
>
> ;; world = Nat
>
> ;; world -> scene
> (define (show w)
>  (nw:rectangle w w 'solid 'red))
>
> (big-bang 50 (on-tick add1 .6) (on-draw show))

Try:

(big-bang 50 (on-tick add1 .6) (on-draw show 300 400))

The extra arguments to on-draw specify a width and height.  See online
documentation at:
http://docs.plt-scheme.org/teachpack/2htdpuniverse.html#(form._((lib._2htdp/universe..ss)._big-bang))

--Carl


Posted on the users mailing list.