note: I’m using Perl/Tk on Perl 5
I’m working on a new application, to find this error message:
unknown option "-browsecmd" at /usr/lib/perl5/Tk/Widget.pm line 205.
at pack2.pl line 76
Here is the full argument:
$f1->Checkbutton(-text => "-expand", -onvalue => 1, -offvalue => 0,
-variable => \$expand[$count], -browsecmd => \&repack)
->pack(-ipady => 5, -side => 'left');
What did I do wrong? Can you help me?
The
-browsecmdoption is generally available only for list, tree or grid widgets, where the user can select one of a number of options.If you want to execute a callback when a checkbutton is clicked then you want the
-commandoption.