use strict; use warnings; use feature 'say'; use Prima qw(Application Label InputLine); # use Prima::Stress; my $main = Prima::MainWindow-> create( text => 'Configuration', backColor => cl::White, menuItems => [ ['~File' => [['~Quit' => 'Ctrl+Q', '^Q', sub { $::application->close } ], ], ], ] ); $main-> hide; my $table = $main-> insert( Widget => pack => { side => 'top' }, ); my @cols = map $table-> insert( Widget => pack => { side => 'left', anchor => 'n' }, ), 0 .. 1; # let's pretend columns do have different scale $cols[ 1 ]-> font({ size => 5 + $cols[ 0 ]-> font-> size }); for ( 0 .. 9 ) { my $label = $cols[0]-> insert( Label => text => substr( 'Label 1234567890', 0, 7 + $_ ) . ': ', pack => { side => 'top', anchor => 'e' }, ); my $input = $cols[1]-> insert( InputLine => text => '12345', pack => { side => 'top' }, ); my $h_L = $cols[0]-> height; my $h_IL = $cols[1]-> height; if ( $h_L > $h_IL ) { $input-> pack( pady => $h_L - $h_IL ) } else { $label-> pack( pady => $h_IL - $h_L ) } } $main-> show; Prima-> run;