Checkbox enable/disable

Post Reply
User avatar
plantenkennis
Posts: 151
Joined: Wed Nov 25, 2015 7:13 pm
Location: the Netherlands
Contact:

Checkbox enable/disable

Post by plantenkennis »

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.

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

 
Kind regards,

René Koot
Post Reply