How can I set the item index of an item in AdvOfficeRadioGroup1 to -1 when I uncheck the checkbox? Unchecking disables the items but the selection is still visible.
Edit :
How can I set the item index of an item in AdvOfficeRadioGroup1 to -1 when I uncheck the checkbox? Unchecking disables the items but the selection is still visible.
Edit :
Attach this code:
PROCEDURE TMainForm.AdvOfficeRadioGroup1CheckBoxClick(Sender : TObject);
BEGIN
IF AdvOfficeRadioGroup1.CheckBox.Checked THEN BEGIN
IF AdvOfficeRadioGroup1.Tag>=0 THEN AdvOfficeRadioGroup1.ItemIndex:=AdvOfficeRadioGroup1.Tag;
AdvOfficeRadioGroup1.Tag:=-1
END ELSE BEGIN
AdvOfficeRadioGroup1.Tag:=AdvOfficeRadioGroup1.ItemIndex;
AdvOfficeRadioGroup1.ItemIndex:=-1
END
END;
to the OnCheckBoxClick event. It will use the AdvOfficeRadioGroup's Tag property to store the previously selected ItemIndex so that it can be restored when you check the checkbox again.