Reputation: 47
I am trying to make a bind_class to a ttk Entry widget but it does not work. It only work properly when I bind each Entry widget separately. Would you help me?
Thank you in advance
from tkinter import ttk
from tkinter.ttk import*
from tkinter import *
root = Tk()
def clicker(event):
myLabel = ttk.Label( root, text = 'You clicked a button' )
myLabel.pack()
myEntry = ttk.Entry( root )
myEntry.pack()
root.bind_class( 'Entry', '<Button-1>', clicker )
root.mainloop()
Upvotes: 1
Views: 336
Reputation: 47
When I replaced 'Entry' by 'TEntry' it worked perfectly
Upvotes: 2