/usr/share/doc/perl-tk/examples/dialog is in perl-tk 1:804.031-1build1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | #!/usr/bin/env perl
# Demonstrate how to use Dialog to create and manipulate dialog objects.
# lusol@Lehigh.EDU 95/06/14
require 5.002;
use Tk;
require Tk::Dialog;
use strict;
my $MW = MainWindow->new;
my $but = $MW->Button(-text => 'Quit', -command => \&exit);
$but->pack;
my $bitmaps = Tk->findINC("demos/images");
my $D1 = $MW->Dialog(
-title => 'Dialog Example 1',
-text => '',
-bitmap => "\@${bitmaps}/noletters",
-default_button => '3',
-buttons => ['OK', '2', '3'],
);
my $D2 = $MW->Dialog(
-title => 'Dialog Example 2',
-text => 'Frogs lacking lipophores are blue!',
-bitmap => 'warning'
);
$D1->configure(
-wraplength => '6i',
-justify => 'right',
-text => 'Crest has been shown to be an effective ' .
'decay-preventive dentifrice that can be of significant ' .
'value when used in a conscientiously applied program ' .
'of oral hygiene and regular professional care.',
);
$D1->configure(-bg => 'yellow', -fg => 'blue');
print "Selected button = ", $D1->Show, ".\n";
$D2->Show('-global');
$D2->configure(-text => 'Change message text.');
$D2->Show;
$D2->configure(-text => 'New font.', -font => '-*-helvetica-bold-r-*-*-*-240-*-*-*-*-*-*');
$D2->Show;
$D2->configure(-text => 'New color.', -foreground => 'cyan');
$D2->Show;
$D2->configure(-text => 'New bitmap and background color.');
$D2->configure(-bitmap => "\@$bitmaps/flagup", -background => 'red');
Show $D2;
$D2->configure(-bitmap => undef, -bg => ($D2->configure(-bg))[3]);
$D2->Subwidget('message')->configure(
-text => 'Now remove the bitmap ...',
-wraplength => '3i',
);
$D2->Show;
$D2->configure(-bitmap => "\@$bitmaps/flagdown");
$D2->Subwidget('message')->configure(
-text => 'and restore Flagdown!',
-justify => 'center',
);
$D2->Show;
MainLoop;
|