State_Space has asked for the wisdom of the Perl Monks concerning the following question:
I removed what was inside pack();, so the code was single lined.my $red; my $green; my $blue; my $mw = MainWindow->new; $mw->title(); my $right_frame = $mw->Label->pack(); my $variable_frame = $right_frame->Label->pack(); my $red_frame = $variable_frame->Label(-textvariable =>\$red)->pack(); my $green_frame = $variable_frame->Label(-textvariable => \$green)->pa +ck(); my $blue_frame = $variable_frame->Label(-textvariable => \$blue)->pack +(); $variable_frame->Label(-text =>"------")->pack();
$red_frame->update; $greeen_frame->update; $blue_frame->update;
Some psuedo code:
Create GUI
LOOP
scan new document
find $red
update gui
find $green
update gui
$find $blue
update gui
END Loop
I would like my variables updating as soon as the change and not wait till they're all found at the end to update in the GUI. The last Label as well containing no textvariable just a string "------" goes blank when the loop resets.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: PERL Tk label(-textvariable)) (Tk::after repeat while(1))
by Anonymous Monk on Aug 27, 2015 at 00:04 UTC | |
Re: PERL Tk label(-textvariable))
by fishmonger (Chaplain) on Aug 26, 2015 at 18:26 UTC | |
by State_Space (Acolyte) on Aug 26, 2015 at 18:59 UTC | |
by fishmonger (Chaplain) on Aug 26, 2015 at 19:33 UTC | |
by State_Space (Acolyte) on Aug 26, 2015 at 19:52 UTC |