Code: Select all
// example 1
Procedure Main()
LOCAL GetList[0], GetOptions, cWorkOrderType, cValidType, nAmountA, nAmountB
DCGETOPTIONS AUTORESIZE
cWorkOrderType := cValidType := SPACE(1)
nAmountA := nAmountB := 0
@ 1,0 DCSAY 'Work Order Type' GET cWorkOrderType ;
VALID {|| cWorkOrderType $ 'AB' }
@ 2,0 DCSAY 'Amount A' GET nAmountA ;
HIDE {|| cWorkOrderType # 'A' }
@ 2,0 DCSAY 'Amount B' GET nAmountB ;
HIDE {|| cWorkOrderType # 'B' }
DCREAD GUI FIT ADDBUTTONS OPTIONS GetOptions
RETURN
Code: Select all
// example 2
Procedure Main()
LOCAL GetList[0], GetOptions, cWorkOrderType, cValidType, nAmountA, nAmountB
DCGETOPTIONS AUTORESIZE
cWorkOrderType := cValidType := SPACE(1)
nAmountA := nAmountB := 0
@ 1,0 DCSAY 'Work Order Type' GET cWorkOrderType ;
VALID {|| IIF( cWorkOrderType $ 'AB', ( cValidType := cWorkOrderType, .t. ), .f. ) }
@ 2,0 DCSAY 'Amount A' GET nAmountA ;
HIDE {|| cValidType # 'A' }
@ 2,0 DCSAY 'Amount B' GET nAmountB ;
HIDE {|| cValidType # 'B' }
DCREAD GUI FIT ADDBUTTONS OPTIONS GetOptions
RETURN