Hi All,
Is it possible to implement a wxRadioBox without any default selection?
I am basically looking to implement a control such that the user is always forced to choose a selection and is not allowed to proceed otherwise.
wxRadioBox and wxCheckedlistbox are 2 such controls i could think of. Is there anything else which can help me achieve this behavior?
Please help!
wxRadioBox without default selection
Re: wxRadioBox without default selection
Hi.
Not sure, but maybe group of wxRadioButton is that what you are looking for.
From the documentation:
Not sure, but maybe group of wxRadioButton is that what you are looking for.
From the documentation:
wxRB_GROUP:
Marks the beginning of a new group of radio buttons.
Re: wxRadioBox without default selection
From the wxRadioBox docs
Expanding on Kvza1r's idea, you can mimic the look of the radio box by putting wxRadioButtons inside a wxStaticBoxSizer
So to answer your question specifically for the wxRadioBox: You must have a selection.virtual void wxRadioBox::SetSelection ( int n )
Sets the selection to the given item.
Notice that a radio box always has selection, so n must be valid here and passing wxNOT_FOUND is not allowed.
Expanding on Kvza1r's idea, you can mimic the look of the radio box by putting wxRadioButtons inside a wxStaticBoxSizer
Re: wxRadioBox without default selection
Thank you so much for the replies