How to check if left click is clicked in text field in tkinter?
What I am trying to do is that I have highlighted text and this highlight can't be removed with left click (for example: there is self.text.tag_remove("match","1.0",END), which removes the highlight, but it will remove it immediately without even showing the highlight in the first place), so I want to remove highlight under the condition of left clicking in text widget. Here is part of my code which I think might be helpful: def Find(self): count=IntVar() s=self.text.search(self.entry.get(),'1.0',stopindex=END,count=count) self.text.tag_configure("match",background='yellow') end=f'{s}+{count.g
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.