i am trying to program text editor by using tkinter. this is the mark function:
self.text.tag_add("Mark",tk.SEL_FIRST,tk.SEL_LAST)
self.text.tag_config("Mark",background="yellow",foreground="black")
and this is the unmark function
self.text.tag_add("UnMark",tk.SEL_FIRST,tk.SEL_LAST)
self.text.tag_config("UnMark",background="white",foreground = "black")
but the problem is when i mark the text and then unmark it, i cant mark it again. the mark function dont work when i try to mark the text again that i unmarked it.