I want to get the value entered by the user in the "Entry" fiels desinged using Tk module, and pass as param to another script file.
As a first step I tried to get the value and print the value. It is not functioning properly.
Please find the code :
my $input='Enter the site address..';
my $mw = new MainWindow;
my $frm_name= $mw ->Frame()->pack();
my $label =$frm_name -> Label(-text=>"Site Address") -> pack();
my $txt =$frm_name ->Entry()->pack();
my $button = $frm_name -> Button(-text => "Quit",
-command => sub{
$inp=$txt->get();
print $inp; })->pack();
my $txt_area= $mw ->Text(-width=>10,-height=>5)->pack();
MainLoop;
In reply to Retrieving the value of entry fiels by mld
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |