Monks,
My goal is to open a DialogBox, select the content of its Entry, and focus the Entry. I'm able to do this with the following code; however, if I uncomment the add line for the DynaTabFrame it stops working.
Any ideas on how to get around this?
use warnings;
use strict;
use Tk;
my $mw = MainWindow->new();
$mw->geometry('100x100');
my $dyna = $mw->DynaTabFrame()->pack();
#$dyna->add('test', -label => 'test');
dialog();
MainLoop();
sub dialog {
my $text = 'Default';
my $dialog = $mw->DialogBox(-buttons => ['OK']);
my $entry = $dialog->Entry(-textvariable => \$text)->pack();
$entry->selectionRange('0.0', 'end');
$dialog->configure(-focus => $entry);
$dialog->Show();
}