Python Form of tkinter Button Location Instance
- 2021-06-28 13:14:59
- OfStack
As follows:
import tkinter
def go(): # function
print("go function ")
win=tkinter.Tk() # Construct Form
win.title("hello zhaolin")# Title
win.geometry("800x800+300+0")#800 Width, 800 Height, x,y Coordinates, upper left corner
button=tkinter.Button(win,text=" Have a touch of me ",command=go) # Received Message Execution go function
button.pack()# Load into the form,
button1=tkinter.Button(win,text=" Has seed point ",command= lambda :print("hello world"),width=20,height=10)
button1.pack()# Load into the form,
#button.place(10,10)
win.mainloop() # Enter message loop mechanism