#include <GuiConstantsEx.au3>
GUICreate("",490,300)
$k1=GUICtrlCreateCombo("",30,50,100,30);框一
GUICtrlSetData($k1,"a|b","");
$k2=GUICtrlCreateCombo("",150,50,100,30);框二
GUISetState(@SW_SHOW)
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
Case $msg =$k1;点击框一时
$r1=GUICtrlRead($k1);读框一的数据
If $r1="a" Then;如果是‘a’,生成框二的下拉1、2、3、4
gUICtrlSetData($k2,"")
gUICtrlSetData($k2,"1|2|3|4","")
ElseIf $r1="b" Then;如果是‘b’,生成框二的下拉5、6、7、8
gUICtrlSetData($k2,"")
gUICtrlSetData($k2,"5|6|7|8","")
Else
EndIf
EndSelect
WEnd
|