Title: Default Button

I set a button to be the default, but when I hit the enter key, the button is not activated.  It does activate when I click on the button, however.  Can someone tell me what I am missing?

# create About box
my $about = Win32::GUI::DialogBox->new(-name=>'AboutDlg',-width=>250, -height=>210,
        -text=>"About FileHdr", -style=>WS_BORDER | WS_CAPTION, -minsize=>[250,210],
        -maxsize=>[250,210]);
$about->AddButton(-text=>'Close', -height=>30, -width=>65, -top=>150, -left=>170,
        -name=>'aboutClose', -default=>1);
$about->Move($mw->Left + ($mw->Width  - $about->Width)/2, $mw->Top 
        + ($mw->Height - $about->Height)/2);

# close About box
sub aboutClose_Click {
        $about->Hide();
        $mw->Enable();
        $mw->SetForegroundWindow();
    $txt->SetFocus();
}


Thanks,
Jon Doud
[EMAIL PROTECTED]

Reply via email to