grid on a panel and a custom editor

Hello NG,

a while back (a week approximately, the subject is the same) I was
having troubles
with a grid placed on a panel. The panel was stealing the TAB key from
my custom cell
editor based on TextCtrl and traversing through other controls placed
on him. Only
when all the controls were traversed, the next TAB press closed the editor
and moved right. A wx.TE_PROCESS_TAB style flag saved me back then, but
now I moved to other cell editors not using the TextCtrl and I am back
in troubles.
I had to create my own checkbox like control to "save the TAB for me", but now
I want to use wx.Choice, the TAB is being stolen from it and I can't
find any way
to catch it (EVT_CHAR is not being triggered as far as I can observe).
Creating own
choice like control seem to me a little bit complicated at the moment.
The TAB stealing behaviour can be observed using the predefined cell
editors as well,
just put the grids in the demo on a panel instead on a raw frame.

Am I doing something wrong? What can I do to "save the TAB for grid" :-)?

Thank you.

Jirka

PS. WinXP, Python 2.4, wxPython 2.6.0

Jirka Mikulasek wrote:

Hello NG,

a while back (a week approximately, the subject is the same) I was
having troubles
with a grid placed on a panel. The panel was stealing the TAB key from
my custom cell
editor based on TextCtrl and traversing through other controls placed
on him. Only
when all the controls were traversed, the next TAB press closed the editor and moved right. A wx.TE_PROCESS_TAB style flag saved me back then, but
now I moved to other cell editors not using the TextCtrl and I am back
in troubles.
I had to create my own checkbox like control to "save the TAB for me", but now
I want to use wx.Choice, the TAB is being stolen from it and I can't
find any way
to catch it (EVT_CHAR is not being triggered as far as I can observe).
Creating own
choice like control seem to me a little bit complicated at the moment. The TAB stealing behaviour can be observed using the predefined cell
editors as well,
just put the grids in the demo on a panel instead on a raw frame.

Am I doing something wrong? What can I do to "save the TAB for grid" :-)?

Probably the best that you can do is to give the panel a style of zero (in other words, to *not* give it the default style of wx.TAB_TRAVERSAL.) Then you can try to get the tab key from the other controls on the panel and then issue navigation events yourself.

ยทยทยท

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