|
Prima::Label - static text widget |
Prima::Label - static text widget
The class is designed for display of text, and assumes no user interaction. The text output capabilities include wrapping, horizontal and vertical alignment, and automatic widget resizing to match text extension. If text contains a tilde-escaped ( hot ) character, the label can explicitly focus the specified widget upon press of the character key, what feature is useful for dialog design.
my $label = Prima::Label-> create(
text => 'Enter ~name:',
focusLink => $name_inputline,
alignment => ta::Center,
);
ta::XXX constants:
ta::Left ta::Center ta::Right
Selects the horizontal text alignment.
Default value: ta::Left
Default value: 0
Default value: 1
Alt key.
Prima::Label does not provide a separate property to access the
hot key value, however it can be read from the {accel} variable.
Default value: undef.
Alt key, the focusLink
widget is explicitly focused.
If 1, the text is showed as is, and no hot character is underlined.
Key combinations with Alt key are not recognized.
Default value: 0
Default value: 1
If 0, the text is not wrapped unless new line characters are present in the text.
New line characters signal line wrapping with no respect to wordWrap
property value.
Default value: 0
ta::XXX constants:
ta::Top ta::Middle or ta::Center ta::Bottom
Selects the vertical text alignment.
NB: ta::Middle value is not equal to ta::Center's, however
the both constants produce equal effect here.
Default value: ta::Top
Dmitry Karasik, <dmitry@karasik.eu.org>.
Prima, the Prima::Widget manpage, examples/label.pl
|
Prima::Label - static text widget |