#!/usr/bin/perl -w
######################################################################
# md.pl
######################################################################
# Perl Power! - Michael Schilli 1998
######################################################################

###
### Application of the message dialog
###

use Tk;                               # include Tk package
use MessageDialog;                    # MessageDialog package
use strict;

my $message = "This is an error message. Close " .
              "this window with a click on the " .
              "OK button.";

my $top = MainWindow->new();

my $md=MessageDialog->new($top);

### define widgets
$top->Button(-text => "Start message dialog", 
      -command => sub { $md->start("Error message", $message); 
                      })->pack();
$top->Button(-text => "Exit", 
             -command => sub { exit 0 } )->pack();

MainLoop;

