[plt-scheme] escape sequences in DrScheme

From: Noel Welsh (noelwelsh at gmail.com)
Date: Tue Mar 2 08:39:01 EST 2010

My bad. Looks like you need to use a text%/editor% combo, as the
following awesome example demonstrates:

#lang scheme/gui

; Make an awesome style delta
(define lol-delta (make-object style-delta%))
(send lol-delta set-delta 'change-bold)
(send lol-delta set-delta 'change-size 72)
(send lol-delta set-delta-foreground "RED")

; Make some awesome text to dispaly
(define text (new text%))
(send text change-style lol-delta)
(send text insert "OH HAI!  I IZ AWESOME!!1!" 0)

(define snippy (make-object editor-snip% text))


On Sat, Feb 27, 2010 at 10:10 PM, Jan Christiansen
<jac at informatik.uni-kiel.de> wrote:
> On 25.02.2010, at 13:12, Noel Welsh wrote:
>> I believe you can do this by returning string-snip% objects with
>> appropriate styles. Alternatively you can dump your output to a
>> standard terminal.
> Sadly I am not familiar with objects in Scheme. I have managed to define a
> string-snip% object but I am quite lost with the styles. Can you give me a
> hint how I can use styles to assign a color to my string-snip?
> Cheers, Jan

Posted on the users mailing list.