程序代码:
* test.prg
CREATE CURSOR tt (f1 C(1))
INSERT INTO tt VALUES ("1")
INSERT INTO tt VALUES ("2")
INSERT INTO tt VALUES ("3")
of = CREATEOBJECT("form1")
of.show(1)
DEFINE CLASS form1 as Form
ADD OBJECT combo1 as combobox WITH top=10,left=10, width=100,RowSourceType=3
ADD OBJECT combo2 as combobox WITH top=10,left=120,width=100,RowSourceType=3
ADD OBJECT combo3 as combobox WITH top=10,left=230,width=100,RowSourceType=3
PROCEDURE Init
= "SELECT f1 FROM tt WHERE thisform.blCombo1() INTO CURSOR tt_combo1"
= "SELECT f1 FROM tt WHERE thisform.blCombo2() INTO CURSOR tt_combo2"
= "SELECT f1 FROM tt WHERE thisform.blCombo3() INTO CURSOR tt_combo3"
ENDPROC
PROCEDURE combo1.InteractiveChange
ENDPROC
PROCEDURE combo2.InteractiveChange
ENDPROC
PROCEDURE combo3.InteractiveChange
ENDPROC
FUNCTION blCombo1()
RETURN IIF(!EMPTY(), (f1 != ), .T.) AND ;
IIF(!EMPTY(), (f1 != ), .T.)
ENDFUNC
FUNCTION blCombo2()
RETURN IIF(!EMPTY(), (f1 != ), .T.) AND ;
IIF(!EMPTY(), (f1 != ), .T.)
ENDFUNC
FUNCTION blCombo3()
RETURN IIF(!EMPTY(), (f1 != ), .T.) AND ;
IIF(!EMPTY(), (f1 != ), .T.)
ENDFUNC
ENDDEFINE