Text() tags and delete()

B

Bob Greschke

Does Text.delete(0.0, END) delete all of the tags too? Everything says it
does not delete marks, but nothing about tags.

Thanks!

Bob
 
C

Christopher Subich

Bob said:
Does Text.delete(0.0, END) delete all of the tags too? Everything says it
does not delete marks, but nothing about tags.

Note to everyone else: this is a TKinter question.

Tags are attached to text ranges, in the Text widget. If you delete all
of the text in the widget, all of the text ranges will go poof, so
therefore all of the tag attachments will likewise go poof.

This will not delete any tags that have been defined for the widget,
though, although why you'd want to do that is an open question.
 
B

Bob Greschke

Christopher Subich said:
Note to everyone else: this is a TKinter question.

Oops. I meant to put that in the subject.
Tags are attached to text ranges, in the Text widget. If you delete all
of the text in the widget, all of the text ranges will go poof, so
therefore all of the tag attachments will likewise go poof.

That's what I thought, and that was what it looked like was happening (but
just because you can't find something doesn't mean it hasn't been taken to
the garbage :)
This will not delete any tags that have been defined for the widget,
though, although why you'd want to do that is an open question.

We have all kinds. :)

Thanks, Christopher!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top