Thanks. Its works very well. Santosh.
On 8/1/05, Jorge Louis de Castro <[EMAIL PROTECTED]> wrote: > I found a way to do it but I'm not sure it is the cleanest. Maybe someone > else on this list can offer a better solution. > > 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.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 > > >From: sunny sunny <[EMAIL PROTECTED]> > >To: tutor@python.org > >Subject: [Tutor] Color text in Text widget > >Date: Mon, 1 Aug 2005 15:35:52 -0400 > > > >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> red <Red>, but this is <Blue> blue <Blue> > > > >Thanks. > >Santosh. > >_______________________________________________ > >Tutor maillist - Tutor@python.org > >http://mail.python.org/mailman/listinfo/tutor > > > _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor