Tickit::Widget::VHBox - distribute child widgets vertically or horizontally
version 0.001
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 horizontally if there is room, falling back to a vertical layout if necessary.
add, child_opts, children, new, remove, render_to_rb, reshape, set_child, set_child_opts
child_resized, children_changed, find_child, focus_next, window_gained, window_lost
get_style_pen, get_style_text, get_style_values, key_focus_next_after, key_focus_next_before, on_pen_changed, parent, pen, redraw, requested_cols, requested_lines, requested_size, resized, set_parent, set_pen, set_requested_size, set_style, set_style_tag, set_window, style_classes, take_focus, window
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.
The following style keys are used:
The spacing (lines or columns) between children
Almost entirely based on Tickit::Widget::VBox and Tickit::Widget::HBox, see those for more details.
Licensed under the same terms as Perl itself.
To install Tickit::Widget::VHBox, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tickit::Widget::VHBox
CPAN shell
perl -MCPAN -e shell install Tickit::Widget::VHBox
For more information on module installation, please visit the detailed CPAN module installation guide.