Tickit::Widget::Frame(3pm) | User Contributed Perl Documentation | Tickit::Widget::Frame(3pm) |
"Tickit::Widget::Frame" - draw a frame around another widget
use Tickit; use Tickit::Widget::Frame; use Tickit::Widget::Static; my $hello = Tickit::Widget::Static->new( text => "Hello, world", align => "centre", valign => "middle", ); my $frame = Tickit::Widget::Frame->new( child => $hello, style => { linetype => "single" }, ); Tickit->new( root => $frame )->run;
This container widget draws a frame around a single child widget.
The default style pen is used as the widget pen. The following style pen prefixes are also used:
The following style keys are used:
ascii single double thick solid_inside solid_outside
The "ascii" linetype is default, and uses only the "-|+" ASCII characters. Other linetypes use Unicode box-drawing characters. These may not be supported by all terminals or fonts.
Any edge's linetype may be set to "none" to cause that edge not to have a line at all; no extra space will be consumed on that side.
Constructs a new "Tickit::Widget::Static" object.
Takes the following named arguments in addition to those taken by the base Tickit::SingleChildWidget constructor:
For more details see the accessors below.
Accessor for the "title" property, a string written in the top of the frame.
Accessor for the "title_align" property. Gives a vlaue in the range 0.0 to 1.0 to align the title in the top of the frame.
See also Tickit::WidgetRole::Alignable.
Paul Evans <leonerd@leonerd.org.uk>
2018-07-30 | perl v5.26.2 |