Checkbox enable/disable
Posted: Tue Sep 25, 2018 8:11 pm
Hello,
Can we Enable and Disable a Checkbox. And can we programmaticaly change the checked state of a checkbox. What I want is the following:
I have 2 Checkboxes, Check_1 and Check_2. if I uncheck Check_1 I want Check_2 to be unchecked also and set disabled. i tried using ON CHANGE, but could not disable a checkbox.
Can we Enable and Disable a Checkbox. And can we programmaticaly change the checked state of a checkbox. What I want is the following:
I have 2 Checkboxes, Check_1 and Check_2. if I uncheck Check_1 I want Check_2 to be unchecked also and set disabled. i tried using ON CHANGE, but could not disable a checkbox.
Code: Select all
@ 150, 180 CHECKBOX Check_1 VAR lCheck_1 PROMPT 'checkbox 1' OF oDlg SIZE 150, 20 ;
ON CHANGE IF(!lCheck_1, oChkPrintAfmeting:Checked(.F.), )
@ 120, 180 CHECKBOX Check_2 VAR lCheck_2 PROMPT 'checkbox 2' OF oDlg SIZE 150, 20