1Message(3)            User Contributed Perl Documentation           Message(3)
2
3
4

NAME

6       Tk::Message - Create and manipulate Message widgets
7

SYNOPSIS

9       $message = $parent->Message(?options?);
10

STANDARD OPTIONS

12       -anchor   -font     -highlightthickness -takefocus
13       -background    -foreground    -padx     -text
14       -borderwidth   -highlightbackground     -pady     -textvariable
15       -cursor   -highlightcolor     -relief   -width
16
17       See Tk::options for details of the standard options.
18

WIDGET-SPECIFIC OPTIONS

20       Name:     aspect
21       Class:    Aspect
22       Switch:   -aspect
23           Specifies a non-negative integer value indicating desired aspect
24           ratio for the text.  The aspect ratio is specified as
25           100*width/height.  100 means the text should be as wide as it is
26           tall, 200 means the text should be twice as wide as it is tall, 50
27           means the text should be twice as tall as it is wide, and so on.
28           Used to choose line length for text if width option isn't
29           specified.  Defaults to 150.
30
31       Name:     justify
32       Class:    Justify
33       Switch:   -justify
34           Specifies how to justify lines of text.  Must be one of left,
35           center, or right.  Defaults to left.  This option works together
36           with the anchor, aspect, padX, padY, and width options to provide a
37           variety of arrangements of the text within the window.  The aspect
38           and width options determine the amount of screen space needed to
39           display the text.  The anchor, padX, and padY options determine
40           where this rectangular area is displayed within the widget's
41           window, and the justify option determines how each line is
42           displayed within that rectangular region.  For example, suppose
43           anchor is e and justify is left, and that the message window is
44           much larger than needed for the text.  The the text will displayed
45           so that the left edges of all the lines line up and the right edge
46           of the longest line is padX from the right side of the window;  the
47           entire text block will be centered in the vertical span of the
48           window.
49
50       Name:     width
51       Class:    Width
52       Switch:   -width
53           Specifies the length of lines in the window.  The value may have
54           any of the forms acceptable to Tk_GetPixels.  If this option has a
55           value greater than zero then the aspect option is ignored and the
56           width option determines the line length.  If this option has a
57           value less than or equal to zero, then the aspect option determines
58           the line length.
59

DESCRIPTION

61       The Message method creates a new window (given by the $widget argument)
62       and makes it into a message widget.  Additional options, described
63       above, may be specified on the command line or in the option database
64       to configure aspects of the message such as its colors, font, text, and
65       initial relief.  The message command returns its $widget argument.  At
66       the time this command is invoked, there must not exist a window named
67       $widget, but $widget's parent must exist.
68
69       A message is a widget that displays a textual string.  A message widget
70       has three special features.  First, it breaks up its string into lines
71       in order to produce a given aspect ratio for the window.  The line
72       breaks are chosen at word boundaries wherever possible (if not even a
73       single word would fit on a line, then the word will be split across
74       lines).  Newline characters in the string will force line breaks;  they
75       can be used, for example, to leave blank lines in the display.
76
77       The second feature of a message widget is justification.  The text may
78       be displayed left-justified (each line starts at the left side of the
79       window), centered on a line-by-line basis, or right-justified (each
80       line ends at the right side of the window).
81
82       The third feature of a message widget is that it handles control
83       characters and non-printing characters specially.  Tab characters are
84       replaced with enough blank space to line up on the next 8-character
85       boundary.  Newlines cause line breaks.  Other control characters (ASCII
86       code less than 0x20) and characters not defined in the font are
87       displayed as a four-character sequence \xhh where hh is the two-digit
88       hexadecimal number corresponding to the character.  In the unusual case
89       where the font doesn't contain all of the characters in
90       ``0123456789abcdef\x'' then control characters and undefined characters
91       are not displayed at all.
92

WIDGET METHODS

94       The Message method creates a widget object.  This object supports the
95       configure and cget methods described in Tk::options which can be used
96       to enquire and modify the options described above.  The widget also
97       inherits all the methods provided by the generic Tk::Widget class.
98

DEFAULT BINDINGS

100       When a new message is created, it has no default event bindings:
101       messages are intended for output purposes only.
102

BUGS

104       Tabs don't work very well with text that is centered or right-
105       justified.  The most common result is that the line is justified wrong.
106

KEYWORDS

108       message, widget
109
110
111
112perl v5.30.0                      2019-07-26                        Message(3)
Impressum