Hey All,
I'm using a custom checkbox component in my application to get around having to use a label. (http://forums.wxwidgets.org/viewtopic.php?f=21&t=37429)
The problem I have now though, is that this component isn't included in the tab order. I'm assuming that this is because it inherits from wxStaticBitmap, which overrides AcceptFocuse to always return false.
So I tried overriding it again in my component to always return true, but it still didn't solve the problem. It did change things though. Now, rather than my component being skipped when I tab through everything, my component blocks the tab from continuing. So when my component would be next in the tab order, focus stays on the current component no matter how many times you hit tab.
So, any thoughts on how to add a component to the tab order? Thanks!
Add Component to Tab Order?
Re: Add Component to Tab Order?
Try overriding wxWindow::AcceptsFocusFromKeyboard() too.
http://docs.wxwidgets.org/trunk/classwx ... c6aa8301b8
http://docs.wxwidgets.org/trunk/classwx ... c6aa8301b8
Use the source, Luke!
Re: Add Component to Tab Order?
Same result, tabbing halts when it reaches the component.
Re: Add Component to Tab Order?
Hmm, no idea. Did you try wxTAB_TRAVERSAL window style flag?
Use the source, Luke!
Re: Add Component to Tab Order?
Yep, I tried that too, no change.
If you don't have any other ideas, I'm thinking I may try getting it to work by using a different base component, rather than wxStaticBitmap. Do you have any suggestions if I go that route?
If you don't have any other ideas, I'm thinking I may try getting it to work by using a different base component, rather than wxStaticBitmap. Do you have any suggestions if I go that route?
Re: Add Component to Tab Order?
I would probably use wxPanel as base class. You'd have to draw the bitmap yourself then.Do you have any suggestions if I go that route?
Use the source, Luke!
Re: Add Component to Tab Order?
Got it working, thanks!
In case anyone else finds this helpful in the future:
Header File: https://gist.github.com/drautb/5606423
Source File: https://gist.github.com/drautb/5606424
In case anyone else finds this helpful in the future:
Header File: https://gist.github.com/drautb/5606423
Source File: https://gist.github.com/drautb/5606424