topwl has asked for the wisdom of the Perl Monks concerning the following question:
I would like to have on the same Window a Canvas widget and a Scale widget, but I have the error below :
Tk::Error: bad window path name "all" at ./test.pl line 22. Tk callback for scale Tk::After::repeat at /usr/lib/perl5/vendor_perl/5.22/i686-cygwin-thre +ads-64int/Tk/After.pm line 80 [repeat,[{},after#13,500,repeat,[\&main::__ANON__]]] ("after" script)
This the example with the problem:
#!/usr/bin/perl use warnings; use Tk; sub GUI() { $fenetre = new MainWindow( -title => 'test', ); $fenetre->minsize( 200, 70 ); $cadre_voie = $fenetre->Frame()->pack(-fill => 'both', -expand => +1); $voie = $cadre_voie->Scrolled( 'Canvas', -background => '#A0A0A0', ); $voie->pack(-fill => 'both', -expand => 1); $cadre_voie->Scale(-orient=>'horizontal')-> pack(); $fenetre->repeat( 500, sub { $voie->scale('all',0,0,1,1); } ); MainLoop; # Obligatoire } GUI();
Do you have a solution to fix this problem ? or to explain me the problem ?
Thanks, Regards.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tk::Error: bad window path name "all"
by Anonymous Monk on Nov 04, 2015 at 23:07 UTC | |
by Anonymous Monk on Nov 05, 2015 at 00:19 UTC |