[plt-scheme] escape sequences in DrScheme
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))
snippy
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
>