Skip Menu |

This queue is for tickets about the Tk CPAN distribution.

Report information
The Basics
Id: 13437
Status: resolved
Priority: 0/
Queue: Tk

People
Owner: Nobody in particular
Requestors: sporreboken [...] hotmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 804.027
Fixed in: (no value)



Subject: Enter overrides tabbed selection in dialog box (defined default is chosen)
This is perl, v5.8.7 built for MSWin32-x86-multi-thread Binary build 813 [148120] provided by ActiveState http://www.ActiveState.com Platform: Windows XP SP2 (Build 2600.xpsp_sp2_gdr.050301-1519) When I bring up a simple dialog box, the default choice is always selected when I press enter, regardless of me having tabbed to another choice. Ie. I tab to "No" in the following example, and press enter, and "YES!" is printed. If I use space to confirm the selection, it works as expected ("No" being chosen and nothing being printed). Choosing with the mouse also works as expected. This is quite severe as it may very well severely affect the flow of a program, should a user opt to use the keyboard to navigate the dialog boxes. Code to reproduce: ####################### my $mw = MainWindow->new; print "YES!" if GetAnswer('Please reply', 'Do you wish to continue?'); sub GetAnswer { my ($title, $text) = @_; my $answer = $mw->Dialog(-title => $title, -text => $text, -default_button => 'Yes', -buttons => [ 'Yes', 'No'], -bitmap => 'question' )->Show( ); return 1 if $answer eq 'Yes'; return 0; } #######################
On Mon Jun 27 18:42:08 2005, guest wrote: Show quoted text
> This is perl, v5.8.7 built for MSWin32-x86-multi-thread > Binary build 813 [148120] provided by ActiveState > http://www.ActiveState.com > Platform: Windows XP SP2 (Build 2600.xpsp_sp2_gdr.050301-1519) > > When I bring up a simple dialog box, the default choice is always > selected when I press enter, regardless of me having tabbed to > another choice. Ie. I tab to "No" in the following example, and > press enter, and "YES!" is printed. If I use space to confirm the > selection, it works as expected ("No" being chosen and nothing > being printed). Choosing with the mouse also works as expected. > > This is quite severe as it may very well severely affect the flow of a > program, should a user opt to use the keyboard to navigate the > dialog boxes. > > Code to reproduce: > ####################### > my $mw = MainWindow->new; > > print "YES!" if GetAnswer('Please reply', 'Do you wish to continue?'); > > sub GetAnswer { > my ($title, $text) = @_; > my $answer = $mw->Dialog(-title => $title, > -text => $text, > -default_button => 'Yes', -buttons => [ 'Yes', 'No'], > -bitmap => 'question' )->Show( ); > return 1 if $answer eq 'Yes'; > return 0; > } > #######################
Note to myself: maybe Tk::MsgBox should be revived again and match the Tcl/Tl msgbox.tcl as close as possible.
The new Tk will have a new Tk::MesgBox dialog, which should behave like "modern" dialogs. The Tk-804.027_501 development release at CPAN already has this new dialog. Regards, Slaven