|
Тема |
Tk/DialogBox.pm |
|
Автор | Tk (Нерегистриран) | |
Публикувано | 01.07.03 13:52 |
|
|
Probvah edna primerna programa za dialog box ot "Perl cookbok" no mi dava slednoto:
root@root:~# ./a.pl
Can't locate Tk/DialogBox.pm in @INC (@INC contains: /usr/lib/perl5/i386-linux /usr/lib/perl5 /usr/lib/perl5/site_perl/i386-linux /usr/lib/perl5/site_perl /usr/lib/perl5/site_perl .) at ./a.pl line 2.
BEGIN failed--compilation aborted at ./a.pl line 2.
a koda,koito napisah e sledniq:
use Tk::DialogBox;
$dialog = $main->DialogBox( -title => "Register This Program",
-buttons => [ "Register", "Cancel" ] );
# add widgets to the dialog box with $dialog->Add()
# later, when you need to display the dialog box
$button = $dialog->Show();
if ($button eq "Register") {
# ...
} elsif ($button eq "Cancel") {
# ...
} else {
# this shouldn't happen
}
kato vyv blokovete napravih naprimer print "....";
|
| |
|
|
|