# entry textbox for Image times dialog my $entImageFile = $mw->Entry(-width=>30, -textvariable=>\$ImageFilePath,)->pack(); # button to browse for file $mw->Button( -text=>'Browse', -command=> sub { openImageFileDialog(\$ImageFilePath)}, )->pack(); MainLoop; sub openImageFileDialog { my $path_ref = shift; my @types = (["Image Files", [qw/.bmp .giff .tiff/]], ["All files", '*'], ); $$path_ref = $mw->getOpenFile(-title => 'Open Image File:', -filetypes => \@types); }