I'm using Racket 5.3.6 with windows and ran the following GUI program
#lang racket/gui
(define frame (new frame% [label "Example"]))
(define msg (new message% [parent frame][label "No events so far..."]))
(new button% [parent frame]
[label "&Click Me"]
; Callback procedure for a button click:
[callback (lambda (button event)
(send msg set-label "Button click"))])
(send frame show #t)
The documentation http://docs.racket-lang.org/gui/button_.html
says:
------------------------
If & occurs in label (when label includes a string), it is specially
parsed; on Windows and Unix, the character following & is underlined in the
displayed control to indicate a keyboard mnemonic. (On Mac OS X, mnemonic
underlines are not shown.) The underlined mnemonic character must be a
letter or a digit. The user can effectively click the button by typing the
mnemonic when the control’s top-level-window contains the keyboard focus.
----------------------------
but for the above program "C" in the button label isn't underlined and
typing "C" doesn't appear to be working as a keyboard mnemonic.
I'm I doing something wrong or is this a bug?
Thanks,
Harry
____________________
Racket Users list:
http://lists.racket-lang.org/users