Hi all,<br><br>Considering the program below, does anyone know:<br><br>- Why do I get 3 enter messages when moving the mouse cursor into the frame, and 2 enter messages when moving the mouse cursor into the list-box%?<br><br>
- If (as I suspect) there is a call to on-subwindow-event for every sub-component of a widget (i.e. 3 sub-components for a frame%, 2 for a list-box%), how should I filter so that I only process the event once for each component?<br>
<br>Thanks in advance,<br><br>Kieron.<br><br>****<br><br>#lang racket<br><br>(require racket/gui)<br><br>(define my-frame%<br>  (class frame%<br>    (super-new)<br>    (define/override (on-subwindow-event r e)<br>      (when (equal? (send e get-event-type) 'enter)<br>
        (printf "enter ~a~n" (object-name r))))))<br>      <br>(define f (new my-frame% <br>               [label "test list-box"] <br>               [width 400] <br>               [height 200]))<br><br>
(define l (new list-box% <br>               [parent f] <br>               [label "options"] <br>               [choices (list "apple" "pear" "cherry")]<br>               [stretchable-width #f]<br>
               [stretchable-height #f]))<br><br>(send f show #t)<br><br>