你也算是老会员了吧,例子都给你了两个,不会稍微变通下吗…
#include <GUIConstantsEx.au3>
Global $Checkbox_Name_1 = "Checkbox1"
Global $Checkbox_Name_2 = "Checkbox2"
Global $Checkbox_Name_3 = "Checkbox3"
Global $Checkbox1, $Checkbox2, $Checkbox3, $Combo, $Name, $nMsg
GUICreate("My GUI combo") ; 创建一个对话框,并居中显示
$Combo = GUICtrlCreateCombo("item1", 10, 10) ; 创建一个组合列表框(ComboBox)控件
GUICtrlSetData($Combo, "item2|item3", "item3") ; 在列表框中添加新的项目,并设置一个新的默认值
$Checkbox1 = GUICtrlCreateCheckbox($Checkbox_Name_1, 112, 232, 97, 17)
$Checkbox2 = GUICtrlCreateCheckbox($Checkbox_Name_2, 112, 312, 97, 17)
$Checkbox3 = GUICtrlCreateCheckbox($Checkbox_Name_3, 112, 352, 97, 17)
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $Combo
Go(StringRight(GUICtrlRead($Combo), 1))
EndSwitch
WEnd
Func Go($Name)
For $i = 1 To 3
If $Name = $i Then
GUICtrlSetState(Eval('Checkbox' & $i), $GUI_DISABLE)
Else
GUICtrlSetState(Eval('Checkbox' & $i), $GUI_ENABLE)
EndIf
Next
EndFunc ;==>Go
|