Something like this:
#!/usr/bin/perl use strict; use warnings; use Tk; my $ImageFilePath; my $mw = MainWindow->new; $mw->title("IMU Data Processing"); # sizes window $mw->geometry('400x200'); #my $frm = $mw -> Frame(); # label for Image times file my $lblImageFile = $mw->Label( -text => 'Image File:', -padx => 5, -pady=>5, )->pack; # entry textbox for Image times dialog my $entImageFile = $mw->Entry( -width => 30, -textvariable => \$ImageFilePath, )->pack; # button to browse for file my $butImageFile = $mw->Button( -text =>'Browse', -command => sub { my $file = openImageFileDialog($entImageFile); $entImageFile->delete(0, 'end'); $entImageFile->insert(0, $file); } )->pack; MainLoop; sub openImageFileDialog { my $imageFilePathOpen = $mw->getOpenFile(-title => 'Open Image Fil +e:'); return $imageFilePathOpen; }
In reply to Re: Placing a file path in a entrybox from a dialogbox
by stefbv
in thread Placing a file path in a entrybox from a dialogbox
by dgilby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |