[plt-scheme] Weird selection behavior with editor snips

From: Danny Yoo (dyoo at cs.wpi.edu)
Date: Sat Jun 21 00:15:41 EDT 2008

I have the following test code:

;;;

#lang scheme/gui
(require framework)

(define editor-snip (new editor-snip% [editor (new scheme:text%)]))

(send (send editor-snip get-editor) insert "hello")
(define frame (new frame% [label ""]))
(define canvas (new editor-canvas% [parent frame] [editor (new text%)]))

(send (send canvas get-editor) insert editor-snip)
(send (send canvas get-editor) insert "world")
(send frame show #t)

;;;


If I double click the content of the editor snip, it selects
everything in that snip, which is good.  However, if I then click to
"world", then the selection highlight persists on the editor snip,
even though it doesn't have focus anymore.

Is there a workaround for this?


Posted on the users mailing list.