1 2 3 4 5 6 7 8 9 10 11 12
use UI::Dialog; my $d = new UI::Dialog( backtitle => 'Demo', title => 'Default', ); my @selection1 = $d->checklist( text => 'Select one:', list => [ 'tag1', [ 'item1', 0 ], 'tag2', [ 'item2', 1 ], 'tag3', [ 'item3', 1 ] ] ); foreach my $sel (@selection1) { printf( "%s\n", $sel ); }
1
2
3
4
$ perl ~/ex.pl
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
tag2$
tag3