mike_tipping
asked on
Checked Tradiogroup at Run time
I have a radiogroup box which is empty at design time but becomes populated at run time. When I pupulate it the item index is always -1 which means that no buttons are checked.
I can't find a way to set the dirst radio button as checked in code. I can set the item index, but this does nothing for the checked status of the button.
Any ideas
I can't find a way to set the dirst radio button as checked in code. I can set the item index, but this does nothing for the checked status of the button.
Any ideas
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Well that was an easy 100 points... I was being stupid and setting the valuse at the wrong point.
Cheers
Mike T
Cheers
Mike T
Hi mike_tipping,
really easy :-)
thanx
really easy :-)
thanx
You might find that you are better off using a GroupBox and indiviual TRadioButtons in the GroupBox. RadioButtons in a GroupBox are mutually exclusive just as they are in a TRadioGroup, but you have the advantage of setting the Checked value of a specific radio button and having the OnClick event for the RadioButtons.
J.