wx.TAB_TRAVERSAL Problem

Ok, I’m trying to be more precise …

I’ve got a completely normal panel, declared in this manner:

class MyPanel(wx.Panel)

def init(self, parent, to):

wx.Panel.init(self, parent, -1, style=wx.TAB_TRAVERSAL)
# etc

This panel is filled with child controls

self.SetSizer(fGridsizer) # the grid sizer holds many simple controls like TextCtrl,SpinCtrl etc…

Lets say the panel as 10 child controls, and the focus is on the first control.
With tab-key pressed many times, I traverse the panel’s controls. After having pressed 10 times the tab k
ey, the focus
is on the last control of my panel. Every things Ok until now.

Pressing an other time the tab key, I would expect that the focus jumps on the first control of the panel.

Instead, the focus goes on a completely other control inside my app. This is not what I expect!

As you said, my panel of class “MyPanel” is child of an other panel,

A simplified view of the window hierarchy is the following:

App -> Frame -> TreeCtrl
-> Notebook -> Panel -> MyPanel
&n
bsp; -> Panel -> TextCtrl1
> -> Button1

The focus, after the 10-th tab-key, is set … I don’t known where,
then on the TextCtrl1,
then on Button1,
then on the page of the Notebook
then on the first control of MyPanel
then on the second control of MyPanel etc

Viren-Scan für Ih
ren PC! Jetzt für jeden. Sofort, online und kostenlos.
Gleich testen! http://www.pc-sicherheit.web.de/freescan/?mc=022222