kapsule has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use warnings; use Tk; use Tk::Entry; my $mw = new MainWindow; my $new_label = $mw -> Label(-text=>"Enter any character", -foreground=>"red", -font => "verdanafont 10 bold") -> pack(-side=>"top"); my $ent=$mw->Entry()->pack(); my $press = $mw -> Button(-text=>"Press Me", -command =>\&PressMe, -font => "verdanafont 10 bold") -> pack(-side=>"left",-padx=>"5", -ipadx=>"5"); MainLoop; sub PressMe { my $val = $ent->get(); if ($val =~ m/[a-zA-Z0-9]/) { my $response=$mw -> messageBox(-type=>"ok", -message=>"al +phanumeric entered",-icon=>"info",-title=> "info!!"); #$response->attributes(-topmost=>0); } return; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with MessageBox Widget in Perl/Tk
by zentara (Cardinal) on Oct 30, 2008 at 19:34 UTC | |
by kapsule (Acolyte) on Nov 03, 2008 at 10:08 UTC | |
by zentara (Cardinal) on Nov 03, 2008 at 13:53 UTC | |
|
Re: Problem with MessageBox Widget in Perl/Tk
by Anonymous Monk on Oct 30, 2008 at 13:45 UTC | |
by kapsule (Acolyte) on Oct 30, 2008 at 14:50 UTC |