So I have a text widget that stores buttons within it, and I’m noticing the fact that the user can still highlight items, including the buttons, within the text widget. If you want the code for it, here’s a simple example.
from tkinter import *
root = Tk()
box = Text(root, wrap="char", state="disabled", cursor="arrow")
box.pack(fill="both", expand=True)
for i in range(5):
btn = Button(box, text=f"Button {i+1}")
box.window_create("end", window=btn, pady=5, padx=5)
root.mainloop()
Now, I have the text widget typing disabled but I can’t stop the user from highlighting. I’ve tried change the highlight color parameter but that didn’t do much. While functionally, this isn’t a problem, I would rather not have for style. Is this possible?