Commit b6250443 by BellCodeEditor

auto save

parent 0651e310
Showing with 30 additions and 0 deletions
'''
1.pygame和tkinter的区别
pygame 做的一些游戏 监听事件,利用鼠标或者键盘的反馈进行人机互动
tkinter模块 是创建一个窗口,在窗口上布局 一个一个的控件,来组合成一个窗口
2.如何使用tkinter
2.1导入tkinter 通过关键字import
2.2生成一个窗口(用户图形界面) tkinter.Tk()
2.3设置标题 窗口名.title(标题) 标题是一个字符串类型的数据
2.4设置窗口大小 窗口名.geometry('宽x高+x坐标+y坐标')
2.4.1 x坐标+y坐标 确定在桌面什么位置显示
2.4.2 宽x高决定了我们窗口的大小
2.5让窗口一直显示在桌面上 窗口名.mainloop()
'''
import tkinter
root = tkinter.Tk()
root.title('注册')
root.geometry('400x320+500+300')
e1 = tkinter.Entry(root,show = None,font = ('宋体',15),width = 20,bg = 'white')
e1.place(x=100,y=80)
e2 = tkinter.Entry(root,show = None,font = ('宋体',15),width = 20,bg = 'white')
e2.place(x=100,y=130)
e3 = tkinter.Entry(root,show = None,font = ('宋体',15),width = 20,bg = 'white')
e3.place(x=100,y=180)
a = tkinter.Label(root,text = '欢迎登录 ',font = ('宋体',17),width = 40,height = 2,bg = 'silver',fg = 'black')
a.place(x=-10,y=0)
b = tkinter.Button(root,text = '提交',font = ('宋体',12),width = 4,height = 1,bg = 'white',fg = 'black')
b.place(x=180,y=230)
root.mainloop()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment