in reply to Open a file using Tkx package
I don't use Tkx, but from basic knowledge of buttons and callbacks, you don't have a callback for the button. Your code should look something like this:# your code is: our $cb = $frame->new_ttk__button(-text => "Calculate"); our $filename = $cb->getOpenFile();
See Tkx tutorialour $cb = $frame->new_ttk__button( -text => "Calculate", -command => sub{ our $filename = $cb->getOpenFile(); } );
|
---|