Monday, February 17, 2014

Add radio button to existing group - MFC

I am trying to add a new radio button to an existing group box (MFC application). Already there are four buttons. I have added new radio button to this group but application is treating it as different group and does not synchronize with other buttons. I have check GROUP property which is set to false.


Answer:
You are correct that you need to use the 'Group' property but in conjuntion with Tab Order (from the menu .

According to the Tab Order, the first button that has the Group property checked is deemed to be the first control in the group, the following controls are deemed to be part of the Group. A new Group is started when a control with Group checked is found.

Your new button is probably not in the right Tab Order and therefore not part of the Group.

No comments: