1Prima::Label(3)       User Contributed Perl Documentation      Prima::Label(3)
2
3
4

NAME

6       Prima::Label - static text widget
7

DESCRIPTION

9       The class is designed for display of text, and assumes no user
10       interaction. The text output capabilities include wrapping, horizontal
11       and vertical alignment, and automatic widget resizing to match text
12       extension. If text contains a tilde-escaped ( hot ) character, the
13       label can explicitly focus the specified widget upon press of the
14       character key, what feature is useful for dialog design.
15

SYNOPSIS

17               my $label = Prima::Label-> create(
18                       text      => 'Enter ~name:',
19                       focusLink => $name_inputline,
20                       alignment => ta::Center,
21               );
22

API

24   Properties
25       alignment INTEGER
26           One of the following "ta::XXX" constants:
27
28                   ta::Left
29                   ta::Center
30                   ta::Right
31
32           Selects the horizontal text alignment.
33
34           Default value: "ta::Left"
35
36       autoHeight BOOLEAN
37           If 1, the widget height is automatically changed as text extensions
38           change.
39
40           Default value: 0
41
42       autoWidth BOOLEAN
43           If 1, the widget width is automatically changed as text extensions
44           change.
45
46           Default value: 1
47
48       focusLink WIDGET
49           Points to a widget or a widget name (has to be a sibling widget),
50           which is explicitly focused when the user presses the combination
51           of a hot key with the "Alt" key.
52
53           Prima::Label does not provide a separate property to access the hot
54           key value, however it can be read from the "{accel}" variable.
55
56           Default value: "undef".
57
58       hotKey CHAR
59           A key that the label will react to if pressed, even when out of
60           focus.
61
62       showAccelChar BOOLEAN
63           If 0, the tilde ( ~ ) character is collapsed from the text, and the
64           hot character is underlined. When the user presses combination of
65           the escaped character with the "Alt" key, the "focusLink" widget is
66           explicitly focused.
67
68           If 1, the text is showed as is, and no hot character is underlined.
69           Key combinations with "Alt" key are not recognized. See also:
70           "hotKey".
71
72           Default value: 0
73
74       showPartial BOOLEAN
75           Used to determine if the last line of text should be drawn if it
76           can not be vertically fit in the widget interior. If 1, the last
77           line is shown even if not visible in full. If 0, only full lines
78           are drawn.
79
80           Default value: 1
81
82       wordWrap BOOLEAN
83           If 1, the text is wrapped if it can not be horizontally fit in the
84           widget interior.
85
86           If 0, the text is not wrapped unless new line characters are
87           present in the text.
88
89           New line characters signal line wrapping with no respect to
90           "wordWrap" property value.
91
92           Default value: 0
93
94       valignment INTEGER
95           One of the following "ta::XXX" constants:
96
97                   ta::Top
98                   ta::Middle or ta::Center
99                   ta::Bottom
100
101           Selects the vertical text alignment.
102
103           NB: "ta::Middle" value is not equal to "ta::Center"'s, however the
104           both constants produce equal effect here.
105
106           Default value: "ta::Top"
107

AUTHOR

109       Dmitry Karasik, <dmitry@karasik.eu.org>.
110

SEE ALSO

112       Prima, Prima::Widget, examples/label.pl
113
114
115
116perl v5.28.0                      2017-02-28                   Prima::Label(3)
Impressum