Python 3 - Tkinter 浮雕样式
-
简述
小部件的浮雕样式是指围绕小部件外部的某些模拟 3-D 效果。这是一排按钮的屏幕截图,展示了所有可能的浮雕样式 -以下是可用于浮雕属性的可能常量列表 -- FLAT
- RAISED
- SUNKEN
- GROOVE
- RIDGE
-
例子
# !/usr/bin/python3 from tkinter import * import tkinter top = Tk() B1 = Button(top, text = "FLAT", relief = FLAT ) B2 = Button(top, text = "RAISED", relief = RAISED ) B3 = Button(top, text = "SUNKEN", relief = SUNKEN ) B4 = Button(top, text = "GROOVE", relief = GROOVE ) B5 = Button(top, text = "RIDGE", relief = RIDGE ) B1.pack() B2.pack() B3.pack() B4.pack() B5.pack() top.mainloop()
-
结果
执行上述代码时,会产生以下结果 -