Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // execute funtion will call first two functions and finally call listener when a button1 in tkinter is clicked(which is not working as of now)
- def execute():
- button1.config(state='disabled')
- capture()
- create_masterfile()
- #on_click(1, 1, button1, left)
- def capture():
- label.config(text="Started")
- def create_masterfile():
- //perform some actions
- def on_click(x, y, button, pressed):
- print ("Mouse clicked")
- // Perform some actions
- with Listener(on_click=on_click) as listener:
- listener.join()
- app = Tk()
- app.title("Sample Application")
- app.geometry("500x200+100+100")
- label = Label(app, text="Not Started", height=0, width=100)
- b = Button(app, text="Stop/Quit", width=20, command=app.destroy)
- button1 = Button(app, text="Start", width=20, command=execute)
- label.pack()
- b.pack(side='bottom',padx=0,pady=0)
- button1.pack(side='bottom',padx=5,pady=5)
- app.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement