Hi,
I have PanelPC (Advantech) - Touchscreen computer with Windows10 Pro. Im build an app on Python to communicate with PLC Siemens via TCP. It's working super fine.
For human interface I use tkinter, but I have problem with buttons:
I want the buttons to react to a touchscreen push the same way as a mouse click. Now I need to slide the button a little to action.
Is it possible to do this?
I have PanelPC (Advantech) - Touchscreen computer with Windows10 Pro. Im build an app on Python to communicate with PLC Siemens via TCP. It's working super fine.
For human interface I use tkinter, but I have problem with buttons:
I want the buttons to react to a touchscreen push the same way as a mouse click. Now I need to slide the button a little to action.
Is it possible to do this?
baggroundcolor = "#3d6466" buttoncolor = "#28393a" buttonpushedcolor = "#badee2" def button_giveme(): global window_output_bools choosen = False if window_output_bools[0] == True: window_output_bools[0] = False choosen = True if window_output_bools[0] == False and choosen == False: window_output_bools[0] = True #def widget----------------------------------------------- root = tkinter.Tk() root.title("PK") root.geometry('1366x720') root.state('zoomed') #canvas canvas = tkinter.Canvas(root, width= 1366, height= 720, bg=baggroundcolor) canvas.pack(fill= tkinter.BOTH, expand= True) main_backgroundimage = tkinter.PhotoImage(file="C:/Users/OEM/Desktop/Program/Py/GUI/pkhd.png") canvas.create_image((683, 370), image = main_backgroundimage) #buttons btn_givemethecard = tkinter.Button( canvas, text="Give me the card", font=("TkHeadingFont",12), bg=buttoncolor, fg="white", activebackground=buttonpushedcolor, activeforeground="black", command=lambda:button_giveme() ) btn_givemethecard.place(x=90, y=240) #run window app root.mainloop()