Tickit::Widget::VBox - distribute child widgets in a vertical column
Tickit::Widget::VBox
use Tickit; use Tickit::Widget::VBox; use Tickit::Widget::Static; my $vbox = Tickit::Widget::VBox->new; foreach my $position (qw( top middle bottom )) { $vbox->add( Tickit::Widget::Static->new( text => $position, align => "centre", valign => $position, ), expand => 1 ); } Tickit->new( root => $vbox )->run;
This subclass of Tickit::Widget::LinearBox distributes its children in a vertical column. Its width will be the width of the widest child, and its height will be the sum of the heights of all the children, plus the inter-child spacing.
The default style pen is used as the widget pen.
Note that while the widget pen is mutable and changes to it will result in immediate redrawing, any changes made will be lost if the widget style is changed.
Paul Evans <leonerd@leonerd.org.uk>
To install Tickit, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tickit
CPAN shell
perl -MCPAN -e shell install Tickit
For more information on module installation, please visit the detailed CPAN module installation guide.