Hi, On Wed, 10 Feb 2016 16:30:18 -0700 Bob Greschke <b...@passcal.nmt.edu> wrote:
> I write stuff to a Text() and some words and lines are different colors > or are links (binds) using Tags. I can Text().get(0.0, END), get all of > the text, then insert that in another Text() to make a copy, but how do > I get/transfer the other "formatting" info? The binds aren't real > important, but the different colored text would be nice. I think you could apply the same calls to tag_configure() and tag_bind() to both widgets and then try something like this to copy the tags from one widget to the other (at least as a starting point): def copy_tags(): tags = t1.tag_names() for tag in tags: r = t1.tag_ranges(tag) if r: t2.tag_add(tag, *r) If the parts of text that are "tagged" are not at the same position in t2 you would of course have to shift each element of t1.tag_ranges() by an offset of t2.index.insert() or so. Best regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. Murder is contrary to the laws of man and God. -- M-5 Computer, "The Ultimate Computer", stardate 4731.3 _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org https://mail.python.org/mailman/listinfo/tkinter-discuss