quot;)
>
> txtBox.insert(END,"I am red ", "r")
> txtBox.insert(END,"and I am blue\n", "b")
>
> Hope that helps
> jorge
>
> >From: sunny sunny <[EMAIL PROTECTED]>
> >To: tutor@python.org
> >Subject: [Tutor] Color t
> I use the text's configuration to define tags that I apply to
> sections of the text. For example:
>
> txtBox = Text(self, width=80, height=20)
> # configuration for red
> txtBox.insert(END,"I am red ", "r")
I don't know if it's the absolute best way but I didn't know you could
do that and I th
on for red
txtBox.tag_config("r", foreground="red")
# configuration for blue
txtBox.tag_config("b", foreground="blue")
txtBox.insert(END,"I am red ", "r")
txtBox.insert(END,"and I am blue\n", "b")
Hope that helps
jorge
>Fro
Hi all,
How do I add color to the text in the Text widget? I tried using the
ASCII sequence but it didnt work.
For example, I want to add:
This is red , but this is blue
Thanks.
Santosh.
___
Tutor maillist - Tutor@python.org
http://mail.python.or