[plt-scheme] setting the colour of a snip
Hi,
this is one way to change the colour of a snip;
(define red-style (send style-list find-or-create-style (send (send
this-pasteboard get-style-list) basic-style) (send (make-object
style-delta%) set-delta-foreground (make-object color% "red"))))
(define blue-style (send style-list find-or-create-style (send (send
this-pasteboard get-style-list) basic-style) (send (make-object
style-delta%) set-delta-foreground (make-object color% "blue"))))
(send snip set-style red-style)
Is there another way?
I'd Ideally want to set snip foreground colour as an rgb triple; for
instance if I wanted snips to change colour based on changing
variable; (mouse x position is a nice useless example) something
like; (send snip set-foreground r g b )
Cheers,
Stephen
--
Stephen De Gabrielle
s.degabrielle at ucl.ac.uk
Telephone +44 (0)20 7679 5242 (x45242)
Mobile 079 851 890 45
Project: Making Sense of Information (MaSI)
http://www.uclic.ucl.ac.uk/annb/MaSI.html
UCLIC: University College London Interaction Centre
http://www.uclic.ucl.ac.uk/
Remax House - 31/32 Alfred Place
London - WC1E 7DP