I'm using (agw) GenericMessageDialog in wxPython 2.8.12.1 with Python
2.7.3.
It's working fine with the mouse. How do I get it to respond to the Enter
key (and to the Tab key if there is more than one button)?
I'm using (agw) GenericMessageDialog in wxPython 2.8.12.1 with Python
2.7.3.
It's working fine with the mouse. How do I get it to respond to the Enter
key (and to the Tab key if there is more than one button)?
Hi,
On 20/04/2013 17:43, Walter Hurry wrote:
I'm using (agw) GenericMessageDialog in wxPython 2.8.12.1 with Python
2.7.3.It's working fine with the mouse. How do I get it to respond to the Enter
key (and to the Tab key if there is more than one button)?
I think it should work out of the box, do you have a sample showing the problem?
Werner
Thanks for the reply. The behaviour is the same in the wxPython demo.
On Sat, 20 Apr 2013 22:28:02 +0200, werner wrote:
Hi,
On 20/04/2013 17:43, Walter Hurry wrote:
I'm using (agw) GenericMessageDialog in wxPython 2.8.12.1 with Python
2.7.3.It's working fine with the mouse. How do I get it to respond to the
Enter key (and to the Tab key if there is more than one button)?I think it should work out of the box, do you have a sample showing the
problem?
Alternatively:
#!/usr/bin/env python
import wx
import wx.lib.agw.genericmessagedialog as GMD
app = wx.App()
with GMD.GenericMessageDialog(None, "Hello World", "Test",
wx.ICON_INFORMATION|wx.OK) as dlg:
dlg.ShowModal()
On Sat, 20 Apr 2013 20:37:36 +0000, Walter Hurry wrote:
On Sat, 20 Apr 2013 22:28:02 +0200, werner wrote:
Hi,
On 20/04/2013 17:43, Walter Hurry wrote:
I'm using (agw) GenericMessageDialog in wxPython 2.8.12.1 with Python
2.7.3.It's working fine with the mouse. How do I get it to respond to the
Enter key (and to the Tab key if there is more than one button)?I think it should work out of the box, do you have a sample showing the
problem?Thanks for the reply. The behaviour is the same in the wxPython demo.
Walter Hurry wrote:
On Sat, 20 Apr 2013 20:37:36 +0000, Walter Hurry wrote:
On Sat, 20 Apr 2013 22:28:02 +0200, werner wrote:
Hi,
On 20/04/2013 17:43, Walter Hurry wrote:
I'm using (agw) GenericMessageDialog in wxPython 2.8.12.1 with Python
2.7.3.It's working fine with the mouse. How do I get it to respond to the
Enter key (and to the Tab key if there is more than one button)?I think it should work out of the box, do you have a sample showing the
problem?Thanks for the reply. The behaviour is the same in the wxPython demo.
Alternatively:
#!/usr/bin/env python
import wx
import wx.lib.agw.genericmessagedialog as GMDapp = wx.App()
with GMD.GenericMessageDialog(None, "Hello World", "Test",
wx.ICON_INFORMATION|wx.OK) as dlg:
dlg.ShowModal()
Platform?
IIRC the code that handles the Enter key in dialogs by default searches for a child widget with an ID of wx.ID_OK and then triggers a button event from it. It may also be ensuring that the widget is a wxButton so that could be why it isn't working the the generic buttons that GMD uses.
--
Robin Dunn
Software Craftsman
Thanks, Robin.
Platform:
$ uname -a
FreeBSD red.laptop 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4
09:23:10 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/
GENERIC amd64
$
On Sat, 20 Apr 2013 15:10:34 -0700, Robin Dunn wrote:
Walter Hurry wrote:
On Sat, 20 Apr 2013 20:37:36 +0000, Walter Hurry wrote:
On Sat, 20 Apr 2013 22:28:02 +0200, werner wrote:
Hi,
On 20/04/2013 17:43, Walter Hurry wrote:
I'm using (agw) GenericMessageDialog in wxPython 2.8.12.1 with
Python 2.7.3.It's working fine with the mouse. How do I get it to respond to the
Enter key (and to the Tab key if there is more than one button)?I think it should work out of the box, do you have a sample showing
the problem?Thanks for the reply. The behaviour is the same in the wxPython demo.
Alternatively:
#!/usr/bin/env python
import wx import wx.lib.agw.genericmessagedialog as GMD
app = wx.App()
with GMD.GenericMessageDialog(None, "Hello World", "Test",
wx.ICON_INFORMATION|wx.OK) as dlg:
dlg.ShowModal()Platform?
IIRC the code that handles the Enter key in dialogs by default searches
for a child widget with an ID of wx.ID_OK and then triggers a button
event from it. It may also be ensuring that the widget is a wxButton so
that could be why it isn't working the the generic buttons that GMD
uses.