Chinaunix首页 | 论坛 | 博客
  • 博客访问: 497922
  • 博文数量: 74
  • 博客积分: 750
  • 博客等级: 军士长
  • 技术积分: 1453
  • 用 户 组: 普通用户
  • 注册时间: 2012-08-29 15:59
文章分类
文章存档

2014年(30)

2013年(8)

2012年(36)

分类: Python/Ruby

2012-11-02 14:01:11

Label常见的参数:

-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. -borderwidth => amount Changes the width of the edges of the Label. -cursor => cursorname Changes the cursor to cursorname when the mouse is over this widget. -font => fontname Indicates that the text in the widget will be displayed with fontname . -foreground => color Changes the text of the Button (or the bitmap) to color . -height => amount Sets the height of the Label to amount ; amount is a valid screen distance. -highlightbackground => color Sets the color of the focus rectangle when the widget is not in focus to color . -highlightcolor => color Sets the color of the focus rectangle when the widget has focus to color . -highlightthickness => amount Sets the width of the focus rectangle. Default is 0 for the Label. -image => imgptr Displays the image to which imgptr points, instead of text. -justify => 'left' | 'right' | ' center ' Sets the side of the Label against which multiline text will justify. -padx => amount Adds extra space inside the edge to the left and right of the Label. -pady => amount Adds extra space inside the edge to the top and bottom of the Label. -relief => ' flat ' | 'groove' | 'raised' | 'ridge' | 'sunken' Changes the type of edges drawn around the Button. -takefocus => 0 | 1 | undef Changes the ability of the Label to have the focus or not. -text => text Displays a text string in the Label. -textvariable => /$variable Points to the variable containing text to be displayed in the Label. Label will change automatically as $variable changes. -underline => n Causes the n th character to be underlined. Allows that key to invoke the widget when it has the focus. Default value is -1 (no character underlined). -width => amount Causes the Label width to be amount . -wraplength => amount Indicates that the text in the Label will wrap when it gets longer than amount .
Entry的参数: -cursor => cursorname Changes the cursor to cursorname when it is over the widget. Sets the color the highlight rectangle should be when the widget does not have the keyboard focus. Sets the color the highlight rectangle should be when the widget does have the keyboard focus. Sets the color of the insert cursor. Sets the width of the insert cursor's border. Normally used in conjunction with -ipadx and -ipady options for the geometry manager. Sets the amount of time the insert cursor is off in the Entry widget. Sets the amount of time the insert cursor is on in the Entry widget. Sets the width of the insert cursor. Default is 2. -takefocus => 0 | 1 | undef Allows or disallows this widget to have the keyboard focus. Specifies the events that invoke the -validatecommand callback: none (default), focus , focusin , focusout , key , or all .
阅读(1337) | 评论(0) | 转发(0) |
0

上一篇:python里的file比较

下一篇:Tk之Entry功能

给主人留下些什么吧!~~