以下是引用w7802672在2015-6-9 20:28:29的发言:
请帮忙看一下,我的意思是:
thisform.optiongroup2.Visible=.t.
thisform.optiongroup2.option1.Visible=.t.
thisform.optiongroup2.option2.Visible=.t.
thisform.optiongroup2.option3.Visible=.t.
&&此时需要等待做出选择
if thisform.optiongroup2.value=1
do 1.prg
endif
if thisform.optiongroup2.value=2
do 2.prg
endif
if thisform.optiongroup2.value=3
do 3.prg
endif
现在的情况是还没等进行选择呢,后面的IF语句就开始执行了呀。
属性和事件要分开来处理
1、适当时候设置:
thisform.optiongroup2.Visible=.t.
thisform.optiongroup2.option1.Visible=.t.
thisform.optiongroup2.option2.Visible=.t.
thisform.optiongroup2.option3.Visible=.t.
2、当用户改变选择时,触发optiongroup的InteractiveChange事件
在optiongroup的InteractiveChange事件中写代码:
do case
case this.value=1
do p1.prg
case this.value=2
do p2.prg
case this.value=3
do p3.prg
endcase