2017年8月27日 星期日

Message Widget

The syntax of a message widget: 

w = Message ( master, option, ... ) 


The Options in Detail

OptionMeaning
anchorThe position, where the text should be placed in the message widget: N, NE, E, SE, S, SW, W, NW, or CENTER. The Default is CENTER.
aspectAspect ratio, given as the width/height relation in percent. The default is 150, which means that the message will be 50% wider than it is high. Note that if the width is explicitly set, this option is ignored.
backgroundThe background color of the message widget. The default value is system specific.
bgShort for background.
borderwidthBorder width. Default value is 2.
bdShort for borderwidth.
cursorDefines the kind of cursor to show when the mouse is moved over the message widget. By default the standard cursor is used.
fontMessage font. The default value is system specific.
foregroundText color. The default value is system specific.
fgSame as foreground.
highlightbackgroundTogether with highlightcolor and highlightthickness, this option controls how to draw the highlight region.
highlightcolorSee highlightbackground.
highlightthicknessSee highlightbackground.
justifyDefines how to align multiple lines of text. Use LEFT, RIGHT, or CENTER. Note that to position the text inside the widget, use the anchor option. Default is LEFT.
padxHorizontal padding. Default is -1 (no padding).
padyVertical padding. Default is -1 (no padding).
reliefBorder decoration. The default is FLAT. Other possible values are SUNKEN, RAISED, GROOVE, and RIDGE.
takefocusIf true, the widget accepts input focus. The default is false.
textMessage text. The widget inserts line breaks if necessary to get the requested aspect ratio. (text/Text)
textvariableAssociates a Tkinter variable with the message, which is usually a StringVar. If the variable is changed, the message text is updated.
widthWidget width given in character units. A suitable width based on the aspect setting is automatically chosen, if this option is not given.

沒有留言:

張貼留言