[plt-scheme] How to change colors in an editor object

From: Robby Findler (robby at cs.uchicago.edu)
Date: Mon May 19 16:02:20 EDT 2003

The docs are there, but maybe not easy to find. Here's an example:

  (define p (send transcript-editor last-position))
  (send trascript-editor insert "text" p p)
  (define sd (make-object style-delta%))
  (send sd set-delta-foreground "red")
  (send transcript-editor change-style sd p (send transcript-editor last-position))


At Mon, 19 May 2003 21:59:58 +0200 (MEST), Daniel Egger wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> Hello!
> In school we had to make a metacircular evaluator. It works fine so far but
> I'd like to enhance it a little bit.
> We have created an editor-obeject to make some user-interactions. It prints
> text in this way: (send TranscriptEditor insert "text"). Now I'd like to
> change the color of the text, i.e. for an error output that should be red. Is
> this possible? And if yes how?
> I've read something about a change-style method wich speaks about changing
> the text color in an editor-object but this option isn't really documented
> unfortunetaly.
> regards,
> Daniel
> -- 
> +++ GMX - Mail, Messaging & more  http://www.gmx.net +++
> Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!

Posted on the users mailing list.