I have a Frame that I pop up (by calling Show()) when the user wants to edit something.
The frame has about 6 data entry fields, but I can't seem to get the Tab Traversal working. I have tried setting the wxTAB_TRAVERSAL on the individual controls, the panel that they are on, and the frame that holds the panel.
Strangely, when hitting the TAB key in the first field, it sounds a error beep, while hitting TAB in any of the other fields does nothing.
The documentation states for wxTAB_TRAVERSAL - "Use this to enable tab traversal for non-dialog windows".
My window is not a wxDialog, but it does popup sort of like one. Is there some other mechanism for enabling TAB traversal for a pop-up window?
I don't know if it makes a difference or not, but I am using wxFormBuilder to create this frame.
I am running wxWidgets 3.0.2 under Win7-64 with VisualStudio 2010.
Thanks.
TAB Traversal question
-
- Super wx Problem Solver
- Posts: 469
- Joined: Tue Jun 20, 2006 6:47 pm
- Contact:
Re: TAB Traversal question
I'd guess you're trying to create the items directly on the frame like this:
Instead, put a panel between the frame and the items like this:
-
- Experienced Solver
- Posts: 74
- Joined: Thu Sep 25, 2014 7:40 pm
Re: TAB Traversal question
I had tried that already, but I tried it again and it works. I must have done it incorrectly the first time.
Thank you, that was very helpful.
As a side note, having that additional hierarchy meant that I also had to enable the window extra style "wxWS_EX_VALIDATE_RECURSIVELY" for my validators to work. This is not a big deal, but is mentioned just for future reference in case others run into this same issue.
Thanks again for the help.
Thank you, that was very helpful.
As a side note, having that additional hierarchy meant that I also had to enable the window extra style "wxWS_EX_VALIDATE_RECURSIVELY" for my validators to work. This is not a big deal, but is mentioned just for future reference in case others run into this same issue.
Thanks again for the help.
Re: TAB Traversal question
Also for future reference, the style is not needed anymore in wxWidgets 3.1 and later:mbeardsley wrote:As a side note, having that additional hierarchy meant that I also had to enable the window extra style "wxWS_EX_VALIDATE_RECURSIVELY" for my validators to work. This is not a big deal, but is mentioned just for future reference in case others run into this same issue.
https://github.com/wxWidgets/wxWidgets/ ... baac567e4d