label控件

简介: label控件
import tkinter as tk

win = tk.Tk()
win.title("逻辑网")
win.geometry('400x200')
win.iconbitmap('../image/icon.ico')
# 若内容是文字则以字符为单位,图像则以像素为单位
label = tk.Label(win, text="我是个穷光蛋!!!", font=('宋体', 20, 'bold italic'), bg="#7CCD7C",
                 # 设置标签内容区大小
                 width=30, height=5,
                 # 设置填充区距离、边框宽度和其样式(凹陷式)
                 padx=10, pady=15, borderwidth=10, relief="sunken")
label.pack()
win.mainloop()
目录
相关文章
|
1月前
QComboBox设置下拉item大小
QComboBox设置下拉item大小
66 0
|
1月前
|
小程序 Python
Tkinter 中的标签(Label)
Tkinter 中的标签(Label)组件是一种用于显示文本或图像的控件。它可以通过 tk.Label() 函数创建,常用的属性包括: - text:设置标签显示的文本内容。
39 1
|
算法 Python
Tkinter的Label与Button
Tkinter是Python的一个内置包,主要用于简单的界面设计,使用起来非常方便。
76 0
Tkinter的Label与Button
|
Shell Python 容器
Qt 在控件上面绘图 label,pushbutton。。。。。
最近有点时间,就研究研究Qt ,提升一下自己
224 0
Qt 在控件上面绘图 label,pushbutton。。。。。
|
容器
WinForm——Label总结
WinForm——Label总结
190 0
|
C#
【C#/WPF】TextBlock/TextBox/Label编辑文字的问题
原文:【C#/WPF】TextBlock/TextBox/Label编辑文字的问题 标题有点描述不清,就当是为了方便自己用时易于搜索到。
1355 0
|
Web App开发 测试技术