用Tkinter画图形化界面(POP3邮件接收器)

Frame

when I set a frame as

separator = Frame(height=5, bd=1, relief=SUNKEN)

it shows like:
这里写图片描述

Then when I set a frame as

separator = Frame(height=10, bd=5, relief=SUNKEN)

it shows like:
Picture_1

So we can see:
1. “height” set the height of the frame.
2. “bd” set the margin shadow of the frame.

Grid

Use Grid method to place all your widgets:

Label(master, text="用户名:").grid(row=1)
Label(master, text="密码:").grid(row=2, sticky=E) 
// sticky=E means stick to right of grid (2,1)
Label(master, text="服务器:").grid(row=3)
Input1 = Entry(master)
Input1.grid(row=1, column=1)
Input2 = Entry(master)
Input2.grid(row=2, column=1)
Input3 = Entry(master)
Input3.grid(row=3, column=1)

猜你喜欢

转载自blog.csdn.net/simmel_92/article/details/78757182