|
本帖最后由 yokoliu 于 2009-9-17 13:56 编辑
#include <GuiComboBoxEx.au3>
#include <GuiConstantsEx.au3>
$Debug_CB = False ; Check ClassName being passed to ComboBox/ComboBoxEx functions, set to True and use a handle to another control to see it work
Local $hGUI, $hImage, $input, $hCombo,$sText
; Create GUI
$hGUI = GUICreate("ComboBoxEx Add Dir", 400, 300, -1, -1, -1)
$hCombo = _GUICtrlComboBoxEx_Create ($hGUI, "", 2, 2, 394, 100)
$binput = GUICtrlCreateButton("Input control", 2, 30, 120)
GUISetState()
_GUICtrlComboBoxEx_BeginUpdate ($hCombo)
_GUICtrlComboBoxEx_AddDir ($hCombo, @ScriptDir & "\*.mdb")
_GUICtrlComboBoxEx_EndUpdate ($hCombo)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $binput
;MsgBox(0,0,_GUICtrlComboBoxEx_GetCurSel($hCombo))
;_GUICtrlComboBoxEx_GetItemText($hCombo,_GUICtrlComboBoxEx_GetCurSel($hCombo),$sText)
_GUICtrlComboBox_GetEditText($hCombo)
MsgBox(4160, "Information", "Edit Text: " & $sText)
_GUICtrlComboBox_SetEditText($hCombo, "aaa.mdb")
EndSwitch
WEnd
上面代码_GUICtrlComboBox_GetEditText 为什么不起作用?
_GUICtrlComboBox_SetEditText($hCombo, "aaa.mdb")也不起作用 |
|