在本页中:
control
view
connect

1.17 查找GUI: "lkup-gui.rkt"

 (require htdp/lkup-gui) package: htdp-lib

本教学包提供三个函数:

函数

(control index)  symbol?

  index : natural-number?
读出第index个猜测选项,从0开始计数

函数

(view msg)  true/c

  msg : (or/c string? symbol?)
在消息面板(message panel)中显示msg参数

函数

(connect event-handler)  true/c

  event-handler : (-> button% event% true/c)
连接控制函数(handler)和Check按钮

例如:
(connect
 (lambda (e b)
   (view (control))))
这个例子简单地显示用户键入消息字段(message field)的内容。