[racket] Modal dialog that disables its parent's menu bar in Racket/GUI?
1. Using racket gui library, I find I can't a real modal dialog that
when it's showed, it's impossible to activate its parent window.
2. Although the dialog will block its parent's eventspace, the menu bar
in parent window can be clicked, and thus the same dialog can be showed
again and again. Following is the code:
#lang racket/gui
(define frame (new frame%
[label "test"]
[width 200]
[height 200]))
(define mb (new menu-bar% [parent frame]))
(let ([m (new menu%
[parent mb]
[label "&About"])])
(new menu-item%
[parent m]
[label "&About"]
[callback (lambda (b e) (message-box "About" "This is a test." frame))])
)
(send frame show #t)
(p.s the message-box can pop up a dialog - the same as (new dialog% [parent
frame]))
So if we ignores the first question, can we show a modal dialog that
disables parent's menu bar, or is this a bug in racket/gui?
Besides, is it really impossible to make a real modal dialog in racket/gui?
(I'm working on Win7)
--
ZhangChao,
CS&T, Tsinghua University.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120405/92494ebb/attachment.html>