标签和按钮类似,但是标签不做任何动作,只是提示,它不是一个交互的部件,
你点击它,它不会有任何操作
创建标签:
创建标签的语法:
$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.
以bit