Tkinter之Label
最近要弄弄以前想弄的东东了,
所以图形界面不可少,,TKinter, 就用它了,
简单,满足要求。
#coding: utf8
from Tkinter import *
def tklabel(event):
s = Label(root, text="IloveXin")
s.pack()
root = Tk()
root.wm_title("hello")
labelA = Label(root, text="learn tkinter", background="green")
labelB = Label(root, text="learn tkinter", background="red")
labelC = Label(root, text="learn tkinter", background="blue")
b1 = Button(root, text="click", command=tklabel)
b2 = Button(root, text="click")
b2['width'] = 30
b2['height'] = 6
b2['background'] = 'pink'
b2.bind("<Button-1>", tklabel)
b1.pack()
b2.pack()
labelA.pack()
labelB.pack()
labelC.pack()
root.mainloop()

Tkinter之Label的更多相关文章
- Python3 tkinter基础 Label 显示的文字换行
Python : 3.7.0 OS : Ubuntu 18.04.1 LTS IDE : PyCharm 2018.2.4 Conda ...
- Python3 tkinter基础 Label pack 设置控件在窗体中的位置
Python : 3.7.0 OS : Ubuntu 18.04.1 LTS IDE : PyCharm 2018.2.4 Conda ...
- Python3 tkinter基础 Label justify 多行字符串左对齐
Python : 3.7.0 OS : Ubuntu 18.04.1 LTS IDE : PyCharm 2018.2.4 Conda ...
- Python3 tkinter基础 Label compound 图片上显示文字 fg字体颜色 font字体大小
Python : 3.7.0 OS : Ubuntu 18.04.1 LTS IDE : PyCharm 2018.2.4 Conda ...
- Python3 tkinter基础 Label imag显示图片
Python : 3.7.0 OS : Ubuntu 18.04.1 LTS IDE : PyCharm 2018.2.4 Conda ...
- TKinter当Label绑定bind事件时传参方法
记录下tkinter的 当在label绑定bind事件时,遇到需要传参时的解决方法(因为有event存在 所以不能直接传参) https://www.cnblogs.com/liyuanhong/ar ...
- Tkinter 之Label标签
一.参数说明 语法 作用 Label(window,text=‘xxxxx’) 需要在界面显示的Label标签内容 Label(window,text=‘xxxxx’,height=2) 组件的高度( ...
- python tkinter的Label
from tkinter import * window=Tk() window.title("my first window") window.geometry("50 ...
- Tkinter教程之Label篇
本文转载自:http://blog.csdn.net/jcodeer/article/details/1811293 #Tkinter教程之Label篇'''1.Label的第一个例子text属性使用 ...
随机推荐
- C# Interactive Walkthrough
C# Interactive Walkthrough
- maven工程读取resource下配置文件
maven工程读取resource下配置文件 在maven工程中,我们会将配置文件放到,src/main/resources 下面,例如 我们需要确认resource 下的文件 编译之后存放的位置 ...
- Spring Boot、微服务架构和大数据
一文读懂 Spring Boot.微服务架构和大数据治理三者之间的故事 https://www.cnblogs.com/ityouknow/p/9034377.html 微服务架构 微服务的诞生并非偶 ...
- bzoj 2005 & 洛谷 P1447 [ Noi 2010 ] 能量采集 —— 容斥 / 莫比乌斯反演
题目:bzoj 2005 https://www.lydsy.com/JudgeOnline/problem.php?id=2005 洛谷 P1447 https://www.luogu.org/ ...
- java 格式化日期
SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); simpleDat ...
- 机器学习——Day 1 数据预处理
写在开头 由于某些原因开始了机器学习,为了更好的理解和深入的思考(记录)所以开始写博客. 学习教程来源于github的Avik-Jain的100-Days-Of-MLCode 英文版:https:// ...
- Jmeter_Beanshell解析并提取json响应
1:前置条件 将fastjson-1.2.49.jar包置于jmeter的lib目录下,并将该jar包添加到测试计划的Library中:否则会报:Typed variable declaration ...
- MySql c#通用类
using System; using System.Collections.Generic; using System.Linq; using System.Text;//导命名空间 using S ...
- Coursera公开课-Machine_learing:编程作业6
Support Vector Machines I have some issues to state. First, there were some bugs in original code wh ...
- Oracle快速收集AWR的方案
记一种方便的awr收集方法,该脚本可以按小时收集目标时段的awr 素材:awr_generate.sql(具体脚本内容请见本文末尾) (1)将awr_generate.sql置于数据库服务器本地路径, ...