#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 438, 192, 124)
$Combo1 = GUICtrlCreateCombo("", 184, 56, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "COM1|COM2|COM3|COM4|COM5|COM6|COM7|COM8")
$Input1 = GUICtrlCreateInput("Input1", 190, 100, 121, 21)
$Button1 = GUICtrlCreateButton("Button1", 224, 160, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUICtrlSetData($Combo1, GUICtrlRead($Input1))
EndSwitch
WEnd
Combo更新内容后在列表中,不能显示出来。连续在执行一次操作就能显示出来,这是为什么呢? |