Python:创建GUI界面步骤

# #创建GUI界面的步骤
# - 导入tkinter 模块
# - 创建 GUI 应用程序的顶层主窗口对象
# - 在窗口内创建其他组件
# - 将这些GUI 模块与底层代码进行连接,什么部件就用什么部件调用pack()
# - 进入主事件循环,响应由用户触发每个时间

import tkinter

top = tkinter.Tk()

labell = tkinter.Label(top,text = 'hello.Python')

labell.pack()

top.geometry('400x300+650+200')

top.mainloop()
posted @ 2018-09-23 16:29  Osword  阅读(1879)  评论(0编辑  收藏  举报