Tkinter syntax coloring

Martin v. Löwis martin at v.loewis.de
Thu Dec 26 18:21:30 EST 2002


Dagur Páll Ammendrup <dagurp at heimsnet.is> writes:

> I want to do html syntax coloring in a Tkinter text widget but I'm
> just a beginner using Tkinter. What I have so far takes a few seconds
> to complete so it's obviously not good enough :D
> 
> Does anyone have any pointers for me?

You might want to look on how IDLE does Python syntax coloring, or
perhaps you can find a copy of Grail, to see how it did rendering.  I
believe the trick is to allocate as few tags as possible, and reuse
them whereever feasible.

Regards,
Martin




More information about the Python-list mailing list