当前位置: 代码迷 >> 综合 >> Python tkinter编程之Button_2# -*-coding:utf-8 -*- ''' Button的外观效果 flat groove raised ridge solid sunken
  详细解决方案

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

热度:56   发布时间:2024-01-25 22:42:31.0
# -*-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()

 

  相关解决方案