Thanks for the replies -  most helpful.
Phil
 

> From: dbec...@gmail.com
> Subject: Re: Simple ok/cancel routine
> To: phil.br...@hotmail.co.uk
> Date: Tue, 14 Jun 2016 21:42:09 -0700
> 
> On 6/14/2016 10:29, Philip Brady wrote:
> >
> > I'm writing a perl script using Tk and have had some success but I wish to 
> > have a very simple subroutine to ask the user a question and get a response 
> > 'ok' or 'cancel'.
> >
> > My routine follows but it doesn't quite work as expected.
> > It's fine if I mouse click on 'ok' or simply press the return key - it 
> > correctly returns 'ok'.
> > If I clink 'cancel' it correctly returns 'cancel'.
> >
> > Unfortunately, if I tab to 'cancel' then press return it returns 'ok' 
> > rather than the desired 'cancel'.
> 
> Try space instead of return.  Notice the dotted frame moves when you tab, but
> the sunken background is only on the OK button.  The default button for enter
> is the first button or the one specified as default.
                                          

Reply via email to