I have 2 input controls, Combobox and Checkbox. I want to make that, when check box is on combo box will be disabled and when check box is off, combo box will be enabled.
Following code doesn't work:-
Code: Select all
@ 40, 80 COMBOBOX cboExpid ;
width 300 ;
items aExpnm ;
value 0
@ 40, 400 checkbox chkAllexp caption "All expense heads" ;
width 200 value .t. ;
on change {|| frmTranPrint.cboExpid.value := iif(this.value, 0, frmTranPrint.cboExpid.value), ;
frmTranPrint.cboExpid.enabled := !this.value}
Code: Select all
@ 40, 80 COMBOBOX cboExpid ;
width 300 ;
items aExpnm ;
value 0
@ 40, 400 checkbox chkAllexp caption "All expense heads" ;
width 200 value .t. ;
on change {|| frmTranPrint.cboExpid.value := iif(this.value, 0, frmTranPrint.cboExpid.value), ;
frmTranPrint.cboExpid.enabled := !frmTranPrint.chkAllExp.value}

I don't have any explanation for this.

Can you please explain this behavior?
TIA.
With best regards.
Sudip