[R] color with tcl/tk?

Hua Li hualihua at yahoo.com
Mon Jul 7 01:35:09 CEST 2008


Dear all,

I'm using tcl/tk to create a program to get answers from the user. I'd like a way to highlight/emphasize some of the information using colors. It'll be even better if I can color part of the messages instead of the whole thing. 

For example, I want to put the word "Hello" in red:

require(tcltk)
ReturnVal <- tkmessageBox(title="Greetings from R TclTk",message="Hello, world! Can I print the word 'Hello' in red?",icon="info",type="ok")

using   col="red"  doesn't work. 

Could someone give some hint on this! Thanks!

Hua



More information about the R-help mailing list