Okay. I have a fairly simple dialog on wxMac. On windows, pressing
'enter' triggers the default button. On Mac, it doesn't. How do I fix
this?
Something on the dialog must have the focus in order for the Enter key to be caught. On OS X buttons don't get the focus like they can on the other platforms.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
How can I do that? I tried in the example code calling:
button.SetFocus()
and the behavior doesn't change.
···
On 2/2/06, Robin Dunn <robin@alldunn.com> wrote:
IxokaI wrote:
> Okay. I have a fairly simple dialog on wxMac. On windows, pressing
> 'enter' triggers the default button. On Mac, it doesn't. How do I fix
> this?
>
Something on the dialog must have the focus in order for the Enter key
to be caught. On OS X buttons don't get the focus like they can on the
other platforms.
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
How can I do that? I tried in the example code calling:
button.SetFocus()
and the behavior doesn't change.
Because, as I said, buttons can't get the focus on the Mac. You need to have a control on the dialog that can get the focus. If you just want to display a message and an OK button then consider using the standard wx.MessageDialog. Since it is based on a native API it does handle the Enter and ESC keys as you would expect.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!