I am trying to invoke default widget behavior on demand. Based on this answer I know a bit about bindtags, and taglists.
Let's say for example I have two buttons, and I want to have the bindtag behavior of a specific item in its taglist, of first button, whenever I left click on the right button:
import tkinter as tk
root = tk.Tk()
first_btn = tk.Button(root, text="1st")
second_btn = tk.Button(root, text="2nd")
second_btn.bind("<Button-1>", "expect the bindtag operation here")
first_btn.pack()
second_btn.pack()
root.mainloop()
I haven't specified command=...
for first_btn
as I need to have the very effect of button push for example with my second_btn
binding.
or as another example, I want to have second_btn
to invoke all(ideally of my choosing) bindtag callbacks of first_btn
:
import tkinter as tk
root = tk.Tk()
first_btn = tk.Button(root, text="1st")
second_btn = tk.Button(root, text="2nd", command="first_btn bindtag callbacks")
first_btn.pack()
second_btn.pack()
root.mainloop()
Or, what are reference names(if any) to the operations attached to bindtags?