| Server IP : 170.10.161.225 / Your IP : 216.73.216.78 Web Server : Apache System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64 User : calvet ( 273824) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : ON Directory : /lib64/perl5/vendor_perl/Prima/examples/ |
Upload File : |
use strict;
use warnings;
use Prima qw(Buttons FrameSet Application);
my $w = Prima::MainWindow-> create(
text => "Frames example",
size => [ map { $_ - 128} $::application-> size],
);
my $frame = $w-> insert(
FrameSet =>
size => [$w-> size],
origin => [0, 0],
frameSizes => [qw(211 20% 123 10% * 45% *)],
opaqueResize => 1,
frameProfiles => [ 0,0, { minFrameWidth => 123, maxFrameWidth => 123 }],
);
for (my $i = 0; $i < 6; $i++) {
next if $i == 4;
$frame-> insert_to_frame(
$i,
Button =>
origin => [10, 10],
text => '~Ok',
onClick => sub {
$_[0]-> text($_[0]-> owner-> name);
},
);
}
my $subframe = $frame-> insert_to_frame(
4,
FrameSet =>
arrangement => fra::Vertical,
size => [$frame-> frames-> [4]-> size],
origin => [0, 0],
opaqueResize => 0,
frameSizes => [qw(33% 33% *)],
);
run Prima;