小试Python中的pack()方法
来源:互联网 发布:淘宝没按时发货怎么办 编辑:程序博客网 时间:2024/05/01 09:26
#Copyright (c)2017, 东北大学软件学院学生# All rightsreserved#文件名称:a.py# 作 者:孔云#问题描述:用pack()方法不参加排列标签#问题分析:。代码如下:from tkinter import *root=Tk()lbred=Label(root,text="红色沟槽状边缘",fg="red",font=('微软雅黑',15),width=20,height=2,relief=GROOVE)lbred.pack()lbgreen=Label(root,text="绿色凸起的",fg="green",font=('微软雅黑',15),width=20,height=2,relief=RAISED)lbgreen.pack()lbblue=Label(root,text="蓝色脊状边缘",fg="blue",font=('微软雅黑',15),width=20,height=2,relief=RIDGE)lbblue.pack()lbyellow=Label(root,text="黄色凹陷的",fg="yellow",font=('微软雅黑',15),width=20,height=2,relief=SUNKEN)lbyellow.pack()lbpink=Label(root,text="粉红色平的",fg="pink",font=('微软雅黑',15),width=20,height=2,relief=FLAT)lbpink.pack()root.mainloop()运行结果如下:
注:属性relief为控件呈现的3D浮雕样式,有FLAT(平的)、RAISED(凸起的)、SUNKEN(凹陷的)、GROOVE(沟槽状边缘)和RIDGE(脊状边缘)5种。
阅读全文
0 0
- 小试Python中的pack()方法
- python--pack
- python中的pandas小试
- 【python】python中的struct.pack和strcut.unpack函数
- pack()方法
- python中的struct.pack和strcut.unpack函数
- 电池PACK小谈
- Python中的小坑
- python 函数库/小方法
- python struct pack
- python struct pack
- python struct pack
- python pack布局
- Python read()/pack()/try
- python ~ pack、unpack
- Python struct pack/unpack
- WPF 中的 Pack URI
- WPF 中的 Pack URI
- linux动态库和静态库
- 删除oracle数据库的所有表
- AIDL小例子
- Being a Good Boy in Spring Festival HDU
- hdu 1548 A strange lift
- 小试Python中的pack()方法
- HBuilder常用的快捷键
- idea个性定制
- 与服务器有关东西
- Diary assistant
- 【转载】idea打包java可执行jar包
- USB endpoint 的设置
- python学习_5
- 【Scikit-Learn 中文文档】11 朴素贝叶斯