In Text Widget when I delete all text with Ctrl + A + DEL, the tag is deleted.
How to fix it?
This is tag code:
def _ingrandisci(self,event=None):
BloccoNote._c+=1
self._testo.tag_config("i", font=("Consolas", BloccoNote._c))
self._testo.tag_add("i", "1.0", "end")
self._testo.tag_raise("i")
Initalize your
Text
object.Bind the
<Delete>
key to a function. I assume you have this allready done.At deleting all, bind any keyboard input to the
set_default_tag
function.This function are unbound at the first
event.char
.Tested with Python: 3.5