Racket中不可调整大小的框架

时间:2017-06-17 17:40:50

标签: scheme racket

我正在尝试创建一个不可调整大小的框架来发送消息:

#lang racket/gui

(define (non_resizable_frame)
  (define myframe (new frame% 
                         [label "MyFrame"]
                         [style (list 'no-resize-border)] ; does not work.
                         ))
  (new message% [parent myframe][label "This is just for testing."])
  (new message% [parent myframe][label "I am trying to create a non-resizable frame."])
  (send myframe show #t))

(non_resizable_frame)

但是,框架仍可调整大小。问题在哪里,我该如何解决?

1 个答案:

答案 0 :(得分:0)

在构建框架时,将stretchable-widthstretchable-height init参数设置为#f