http://qs321.pair.com?node_id=132859


in reply to Re: perl/tk messagebox
in thread perl/tk messagebox

Dialog will work if you only want to display a text message. If you are looking for a replacement for the VB MsgBox command , you need to use DialogBox.
use Tk::DialogBox; use Tk::JPEG; [.....] $d = $mw->DialogBox( -title => "reboot", -buttons => [ qw/Yes Cancel/] +); $mw->Photo( "redx", -format => "JPEG", -file => "redx.jpg"); $d->add( Label, image => "redx"); $d->add( Label, -text => "Please reboot now?"); if( $d->Show eq "Yes") { halt(); }