[racket] print bigger text?(message label)

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Thu May 26 07:56:41 EDT 2011

The auto-resize initialization argument to message% should help, I guess?

For example:

  (define s (new message% (label "sentence") (parent f) (auto-resize #t)))

Robby

On Thu, May 26, 2011 at 2:44 AM, 김태윤 <kty1104 at gmail.com> wrote:
> hello
> I made a simple english learning program
> in text text file, korean and english slash saperated pair stored in each line
> it's kind of quiz game
> but the problem is that
> I can't size up the message label
> do I have to use graphical way?
> or is there any easy way I can print bigger text?
> thanks in advanced
>
> #lang racket/gui
> (define answer 0)
> (define (cbs b e)
>  (set! select (random items))
>  (send s set-label
>        (list-ref data select)))
> (define (cba b e)
>  (if (even? select)
>      (set! answer (+ 1 select))
>      (set! answer (- 1 select)))
>  (set! answer (abs answer))
>  (send a set-label
>        (list-ref data answer))
>
>  )
> (define f (new frame% (label "Duplex English Learner") (min-width 320)
> (min-height 60)))
> (define bs (new button% (label "sentence") (parent f) (callback
> (lambda (b e) (cbs b e)))))
> (define ba (new button% (label "answer") (parent f) (callback (lambda
> (b e) (cba b e)))))
> (define s (new message% (label "sentence
>  ") (parent f)))
> (define a (new message% (label "answer
>  ") (parent f)))
> (send f show #t)
> (define path
>  (get-file "utf-8 text only"
>            #f
>            #f
>            "utf-8 text only"))
> (define port (open-input-file path))
> (define data '())
> (define (load [line (read-line port)])
>  (when (not (eof-object? line))
>    (set! data (append data
>                       (regexp-match* #rx"[^/\r]+" line)))
>    (load)))
> (load)
> (define items (length data))
> (define select 0)
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>



Posted on the users mailing list.