Can't Get Tab Key to Move from Field to Field
Posted: Fri Sep 22, 2017 11:26 pm
In wxWidgets and CodeLite, what sizer or other flags do I need to set in order to get the tab key to move the focus around the fields on my screen?
I have many fields on my screen, and I want the cursor to be able to move from field to field, top-left to bottom-right. But pressing the tab key currently has no effect at all on most of the fields on my wxDialog.
I have a series of data-entry fields on my screen, as shown in the CodeLite screen shot below. The fields are either wxTextCtrls or buttons.
The fields are not all in the same sizer. They aren't all even in the same TYPE of sizer. For example, the first "group of data" is a wxStaticBoxSizer containing a 4-column by 3-row wxGridSizer and a button. The wxGridSizer contains wxTextCtrl fields.
The second "group" is just a button.
The third "group" is a text field and a button.
And so on.
At the bottom of the screen are three buttons all in a wxBoxSizer. The only place where pressing the tab key moves the focus from field to field correctly is among those three buttons. Otherwise, the focus never gets into the other fields.
I'm worried that the focus can only move via the tab key if the fields are all in the same sizer. Is that true?
Suggestions?
Colleen
I have many fields on my screen, and I want the cursor to be able to move from field to field, top-left to bottom-right. But pressing the tab key currently has no effect at all on most of the fields on my wxDialog.
I have a series of data-entry fields on my screen, as shown in the CodeLite screen shot below. The fields are either wxTextCtrls or buttons.
The fields are not all in the same sizer. They aren't all even in the same TYPE of sizer. For example, the first "group of data" is a wxStaticBoxSizer containing a 4-column by 3-row wxGridSizer and a button. The wxGridSizer contains wxTextCtrl fields.
The second "group" is just a button.
The third "group" is a text field and a button.
And so on.
At the bottom of the screen are three buttons all in a wxBoxSizer. The only place where pressing the tab key moves the focus from field to field correctly is among those three buttons. Otherwise, the focus never gets into the other fields.
I'm worried that the focus can only move via the tab key if the fields are all in the same sizer. Is that true?
Suggestions?
Colleen