Posted by Grant Foraker on December 19, 2007 at 14:23:08:
First dialog has six radio buttons. Works fine. Second dialog, cloned from first, has seven buttons. When I click on button seven, the already checked button doesn't uncheck. Clicking on 1-6 doesn't uncheck 7.
If I make button 7 the default button, it shows checked and button 7 is returned if I don't change buttons.
I have my IDC's in order, prior headache. The dialogs are built in VS. IDC SELECT and IDC.REPORT1-6 look the same in both. IDC.REPORT7 looks just like 2-6. IDC.REPORT1, in both has the Group=True setting.
IDC.SELECT is a GroupBox.
----------------------------------------------
SET IDC.REPORT1 = 1071
SET IDC.VMD = 1071
SET IDC.REPORT2 = 1072
SET IDC.VMK = 1072
SET IDC.REPORT3 = 1073
SET IDC.QE = 1073
SET IDC.REPORT4 = 1074
SET IDC.QL = 1074
SET IDC.REPORT5 = 1075
SET IDC.QP = 1075
SET IDC.REPORT6 = 1076
SET IDC.QR = 1076
SET IDC.QC = 1077
SET IDC.REPORT7 = 1077
-----------------------------------------------------------------
SET RADIOS = 7
-----------------------------------------------------------------
InitReport:
LET cosCtlId = IDC.SELECT
Let cosState = True
Gosub COS.ShowDlgItem
FOR CTL = 1 TO RADIOS
LET cosCtlId = IDC.REPORT1 + CTL - 1
Let cosState = True
Gosub COS.ShowDlgItem
NEXT CTL
cosItemId = IDC.REPORT1 ! Selected button
cosCtlId = IDC.REPORT1 ! 1st button of group
cosCtlIdEx = IDC.REPORT7 ! Last button of group
Gosub COS.CheckRadioBtn
Return
------------------------------------------------------------------