radiobutton + tab problem

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
dangkhoa
In need of some credit
In need of some credit
Posts: 1
Joined: Tue Sep 26, 2017 5:18 pm

radiobutton + tab problem

Post by dangkhoa »

hi,

i have 3 controls .. one textctrl and two radiobuttons which are connected. When i start the second radio button is set as selected and the textctrl has focus. When i tab from the textctrl to the radiobuttons, the first radiobutton is selected for some reason. But the changed focus shouldn't change the selection, the already selected radiobutton should get the focus.

Any ideas?
Ellan
Experienced Solver
Experienced Solver
Posts: 57
Joined: Mon May 15, 2017 10:11 am

Re: radiobutton + tab problem

Post by Ellan »

you should do what you want in the keyboard event handler function
Thanks

Best Regards

Ellan
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: radiobutton + tab problem

Post by ONEEYEMAN »

Hi,
This is how wxRadioButton set behave - they become selected on the focus set.
You probably should catch EVT_SET_FOCUS on the wxRadioButtons and change the value as appropriately.

Also, do you have wxRadioBox or just a group of the wxRadioButtons?

Thank you.
Post Reply