标签和按钮类似,但是标签不做任何动作,只是提示,它不是一个交互的部件,
你点击它,它不会有任何操作
创建标签:
创建标签的语法:
$label = $parent->Label( [ option => value . . . ] )->pack( );
Label Options
The following is a comprehensive list of options for Labels:
下面列出所有标签的选项:
-anchor => 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'nw' | 'center'
Causes the text to stick to that position in the Label widget. This won't be obvious unless the Label is forced to be larger than standard size.
将文本放在什么位置,主要是当我们的界面很大的时,位置设置特别重要
-background => color
Sets the background color of the Label to color.
设置文字的背景颜色
-bitmap => bitmap
Displays the bitmap contained in bitmap instead of text.
以bitmap图象取代Label中的文字显示,里面放置图象的路径和名称
-borderwidth => amount
Changes the width of the edges of the Label.
设定标签的边框宽度
-cursor => cursorname
Changes the cursor to cursorname when the mouse
标签和单行文本
最新推荐文章于 2022-05-14 05:21:24 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)