I have created a notebook with multiple panels (1 per page) which contain different options for a program I am writing. The main panel which houses the notebook also has OK and Cancel buttons. When i continuously press Tab to navigate the dialog, the controla all gain keyboard focus as I would expect. Shift-Tab, on the other hand, always skips the buttons. Combing through the mailing list archives yields others having interesting navigation issues with notebooks (though none so far have addressed the issue I am seeing). Is this normal?
Also, is there a way in Windows to cause the tab control that is generated to appear as a standard Win32 control? So far, all of the other controls I have worked with render truly native Win32 counterparts, but the notebook is created with the class of _wx_SysTabCtl32.
I have created a notebook with multiple panels (1 per page) which
contain different options for a program I am writing. The main panel
which houses the notebook also has OK and Cancel buttons. When i
continuously press Tab to navigate the dialog, the controla all gain
keyboard focus as I would expect. Shift-Tab, on the other hand, always
skips the buttons. Combing through the mailing list archives yields
others having interesting navigation issues with notebooks (though none
so far have addressed the issue I am seeing). Is this normal?
Probably not, but getting tab-traversal right on all ports has proven to be quite tricky because some want to handle it themselves or otherwise be different from the others. If you make a small runnable sample that demonstrates the problem (MakingSampleApps - wxPyWiki) perhaps somebody will notice something you can do that will make it behave better.
Also, is there a way in Windows to cause the tab control that is
generated to appear as a standard Win32 control? So far, all of the
other controls I have worked with render truly native Win32
counterparts, but the notebook is created with the class of
_wx_SysTabCtl32.
Looking at the code it appears that if you use the style wx.FULL_REPAINT_ON_RESIZE then it will not use the new _wx_SysTabCtl32 window class. However there is this comment in the code:
// SysTabCtl32 class has natively CS_HREDRAW and CS_VREDRAW enabled and it
// causes horrible flicker when resizing notebook, so get rid of it by
// using a class without these styles (but otherwise identical to it)
So be prepared to have to deal with, or live with, more flicker if you do this.
The attached sample demonstrates the issue and the technique I am using to create my options window. Also, setting the tab control's style to wx.FULL_REPAINT_ON_RESIZE still produces the wx window class. Most of our users are blind or low vision, so i am not overly concerned with excessive flickering at this point.
Hopefully this sample will prove helpful. Any tips as to what I could do differently to get around the issue will be appreciated.
I have created a notebook with multiple panels (1 per page) which
contain different options for a program I am writing. The main panel
which houses the notebook also has OK and Cancel buttons. When i
continuously press Tab to navigate the dialog, the controla all gain
keyboard focus as I would expect. Shift-Tab, on the other hand, always
skips the buttons. Combing through the mailing list archives yields
others having interesting navigation issues with notebooks (though none
so far have addressed the issue I am seeing). Is this normal?
Probably not, but getting tab-traversal right on all ports has proven to be quite tricky because some want to handle it themselves or otherwise be different from the others. If you make a small runnable sample that demonstrates the problem (MakingSampleApps - wxPyWiki) perhaps somebody will notice something you can do that will make it behave better.
Also, is there a way in Windows to cause the tab control that is
generated to appear as a standard Win32 control? So far, all of the
other controls I have worked with render truly native Win32
counterparts, but the notebook is created with the class of
_wx_SysTabCtl32.
Looking at the code it appears that if you use the style wx.FULL_REPAINT_ON_RESIZE then it will not use the new _wx_SysTabCtl32 window class. However there is this comment in the code:
// SysTabCtl32 class has natively CS_HREDRAW and CS_VREDRAW enabled and it
// causes horrible flicker when resizing notebook, so get rid of it by
// using a class without these styles (but otherwise identical to it)
So be prepared to have to deal with, or live with, more flicker if you do this.