Hello Monks, This is the first time i'm using Tk module. My program works fine without using Tk. When using Tk, as soon as i click on the command button, the program runs fine in command prompt, but the Tk GUI freezes. The program takes quite a long time to execute, and returns result every 5 seconds which is to be updated in the TableMatrix. But the GUI freezes and finally when the program is complete, everything is updated in the GUI. Is there a way to make the GUI interactive as in VB??? BTW, the program has only 4 widgets - label, text, table (TableMatrix) and a command button. Thanks in advance monks! Sample code:
my $lbl_var_1 = $window -> Label(-text=>"Enter the keyword: ")->pack() +; my $txt_var_1 = $window -> Entry()->pack(-pady=>20); my $btn_var_1 = $window -> Button(-text => "Get the URL !", -command = +> \&Geturl)->pack(); my $table = $window->Scrolled('TableMatrix', -cols=>4, -drawmode=>'fas +t', -variable => $array_var,-state=>"disabled", -resizeborders => 'bo +th',-colstretchmode => 'unset', -rowstretchmode => 'last')->pack(-pad +y=>20, -fill=>'x');
When $btn_var_1 is clicked, the Geturl function, navigates through many sites and takes out a particular URL and returns it. Question updated and exclamations removed as told by Marto. Awaiting your reply. Thanks.
In reply to Perl Tk freezes when command button is clicked ! by muralidharan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |