I'm experimenting with Racket's GUI Toolkit and am trying to get a cool color-changing effect going on with ASCII art on the screen. I have a callback which does the color-changing, but I can't seem to figure out how to call it to get the appropriate result.
At first I tried to use the message control to draw the text, and would then change the text color from there, but as far as I can tell there is no way to change the text color of messages. So I moved on to using the canvas subwindow, but I can't seem to draw multiple lines of text at once; newlines just get removed and the ascii art appears as one long line of text. Furthermore, the on-paint callback I was using to change the color only seems to be called whenever the window is resized or otherwise changed, so the colors don't change if the user is sitting and watching.
If I could find a way to get a callback going on each frame with the canvas, I could loop over a list of text strings and draw each one to the screen, separated vertically as to give the appearance of a newline, but I don't know if such an "on-frame" call exists with canvas.
Any ideas on how to get this working?