Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: displaying program status in perl tk

by balakrishnan (Monk)
on Feb 06, 2009 at 07:52 UTC ( #741823=note: print w/ replies, xml ) Need Help??


in reply to displaying program status in perl tk

I seen that $mw->idletasks; takes the effect. In this case, You getting the status once you pressed the button. There are sometimes or in some places, we require the status to be updated once we pressed the enter key. For this, the following would help,

my $input = $mw->Entry(-takefocus => 1, -textvariable => \$upper_no, -width => 12) ->place(-relx => 0.50, -rely => 0.05); my $counter_label = $mw->Label(-textvariable => \$no, -relief => 'sunken', -anchor => 'center') ->place(-relx =>0.0, -rely => 0.80, -relwidth => 1.0, -relheight = +> 0.2); # When <enter> is pressed, this taken into the action. $input->bind('<KeyPress-Return>', sub { count(); $counter_label->configure(-textvariable => \$no); } );
This might helps for you.


Comment on Re: displaying program status in perl tk
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://741823]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2015-07-31 08:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (275 votes), past polls