HI all,
the GUI has several group boxes, and different controls within these.
Switching between controls via Tab key is no problem within any GroupBox.
However, it is desired that after the last GUI in one group box, the first in the next[/b] GroupBox shall gain focus.
Any ideas?
Jumping using Tab key across different group boxes
-
- Earned a small fee
- Posts: 13
- Joined: Mon Jun 04, 2007 8:17 am
-
- Earned a small fee
- Posts: 22
- Joined: Fri Nov 22, 2013 8:34 am
Re: Jumping using Tab key across different group boxes
this a problem for me as well .. any ideas?
-
- Earned some good credits
- Posts: 113
- Joined: Sat Sep 24, 2011 9:32 pm
- Location: Poland
Re: Jumping using Tab key across different group boxes
You can try to define your own popupmenu function and set up entry for key code WXK_TAB:
Inside of your popupmenu function you can control focus:
Regards
Jarek
Code: Select all
wxAcceleratorEntry entries[1]; //where [1] mens number of wxKeyEvents for different key codes you are going to define
entries[0].Set(wxACCEL_NORMAL, WXK_TAB, ID_NUMBER_FROM_YOUR_POPUPMENU); //now using TAB will run your popup menu function
wxAcceleratorTable accel(1, entries);
SetAcceleratorTable(accel);
Code: Select all
wxWindow *SelectedGUI = wxWindow::FindFocus();
int IdOfSelectedGUI = SelectedGUI->GetId();
if(IdOfSelectedGUI == ID_OF_SOME_GUI){ //depends what is selected GUI
NameOfNextGUI->SetFocus(); //will be set up focus for next GUI
}else{ //... and for all GUI elements
Jarek