[racket] print bigger text?(message label)
I am not quite sure what you are asking, but you can try the following after checking the docs for font% message% and button% ...
(define trial-font (make-object font% 24 'default))
...
(define s (new message% (label "sentence") (parent f) (font trial-font)))
...
I just met a Korean woman, so your program could be useful to me :)
rac
On May 26, 2011, at 1:44 AM, 김태윤 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