[wxPython] EVT_LIST_ITEM_ACTIVATED and RETURN

Key pressing RETURN doesn't generate EVT_LIST_ITEM_ACTIVATED,
but it should since the doc. (W98/Python1.5.2/wx2.2.2)

Udo

···

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users

Key pressing RETURN doesn't generate EVT_LIST_ITEM_ACTIVATED,
but it should since the doc. (W98/Python1.5.2/wx2.2.2)

On Windows it depends on where the list control is at as the RETURN key is
considered a Navigation Key. If there is a wxPanel heirachically above the
list control (IOW, its parent, grandparent, etc...) then the navigation keys
take precedencs and the controls don't normally get them. You might try
using the wxWANTS_CHARS style flag on the list control and see if that makes
a difference.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users

Robin Dunn schrieb:

> Key pressing RETURN doesn't generate EVT_LIST_ITEM_ACTIVATED,
> but it should since the doc. (W98/Python1.5.2/wx2.2.2)

On Windows it depends on where the list control is at as the RETURN key is
considered a Navigation Key. If there is a wxPanel heirachically above the
list control (IOW, its parent, grandparent, etc...) then the navigation keys
take precedencs and the controls don't normally get them. You might try
using the wxWANTS_CHARS style flag on the list control and see if that makes
a difference.

style=wxLC_REPORT|wxSUNKEN_BORDER|wxWANTS_CHARS makes no difference.
The parent is a notebook, in if the notebook has wxWANTS_CHARS or not
makes
also no difference.
(in the moment I use EVT_KEY_UP so I can capture the return-key)

Thanks, Udo

···

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users