Python tkinter编程之Button_2# -*-coding:utf-8 -*- ''' Button的外观效果 flat groove raised ridge solid sunken

# -*-coding:utf-8 -*-
'''
Button的外观效果
flat
groove
raised
ridge
solid
sunken
'''
from tkinter import *
root = Tk()
def hellowButton():
    print('hello Button')
Button(root, text = 'hello button',relief = FLAT).pack()
Button(root, text = 'hello button', relief = GROOVE).pack()
Button(root, text = 'hello button', relief = RAISED).pack()
Button(root, text = 'hello button', relief = RIDGE).pack()
Button(root, text = 'hello button', relief = SOLID).pack()
Button(root, text = 'hello button', command = hellowButton, relief = SUNKEN).pack()
root.mainloop()
发布了33 篇原创文章 · 获赞 5 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/qiukapi/article/details/104032573