Discussion:
[racket] Disable dragging on Pasteboard%
Richard Adler
2015-02-15 15:26:34 UTC
Permalink
Hello Everyone,

I'm trying to disable dragging on the Pasteboard. However using
set-dragable to #f also prevents the snip from being selected.

Any ideas on how I would keep a snip selectable but not dragable?

Thanks.
____________________
Racket Users list:
http://lists.racket-lang.org/users
Dmitry Pavlov
2015-02-15 18:56:13 UTC
Permalink
Richard,
Post by Richard Adler
I'm trying to disable dragging on the Pasteboard. However using
set-dragable to #f also prevents the snip from being selected.
Any ideas on how I would keep a snip selectable but not dragable?
Maybe the following will help:

(define my-pasteboard%
(class pasteboard%
(super-new)
(define/augment (can-interactive-move? snip)
#f)
(define/augment (can-interactive-resize? snip)
#f)
))


Regards,

Dmitry
____________________
Racket Users list:
http://lists.racket-lang.org/users
Richard Adler
2015-02-15 20:49:11 UTC
Permalink
On Sun, 15 Feb 2015 21:56:13 +0300
Post by Dmitry Pavlov
Richard,
Post by Richard Adler
I'm trying to disable dragging on the Pasteboard. However using
set-dragable to #f also prevents the snip from being selected.
Any ideas on how I would keep a snip selectable but not dragable?
(define my-pasteboard%
(class pasteboard%
(super-new)
(define/augment (can-interactive-move? snip)
#f)
(define/augment (can-interactive-resize? snip)
#f)
))
Regards,
Dmitry
Thanks Dmitry that is exactly what I was looking for.


____________________
Racket Users list:
http://lists.racket-lang.org/users

Loading...