import tkinter
from tkinter import *
window=tkinter.Tk()
window.geometry('1000x800+300+300')
window.title('SSH连接器')
window.config(bg='grey')
label=tkinter.Label(window,text='开发者:蜜蜂不采蜜')
label.pack()
Label(window,text='ip地址',width=6).place(x=1,y=1)
Entry(window,width=40).place(x=45,y=1)
Label(window,text='用户名',width=6).place(x=1,y=40)
Entry(window,width=40).place(x=45,y=40)
Label(window,text='密码',width=6).place(x=1,y=80)
Entry(window,width=40,show='*').place(x=45,y=80)
button1=tkinter.Button(window,text='登录')
button1.pack(side=tkinter.LEFT)
button2=tkinter.Button(window,text='取消')
button2.pack(side=tkinter.LEFT)
window.mainloop()
运行结果如下:
标签:tkinter,python,text,代码,40,width,window,place,窗口 From: https://blog.51cto.com/u_15937426/6120413