Add a string
#include <GuiComboBox.au3>
_GUICtrlComboBox_AddString ( $hWnd, $sText )
$hWnd | Control ID/Handle to the control |
$sText | String to add |
Success: | the index of the new item. |
Failure: | -1. |
_GUICtrlComboBox_DeleteString, _GUICtrlComboBox_InitStorage, _GUICtrlComboBox_InsertString, _GUICtrlComboBox_ResetContent
#include <GuiComboBox.au3>
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
Local $idCombo
; Create GUI
GUICreate("ComboBox Add String", 400, 296)
$idCombo = GUICtrlCreateCombo("", 2, 2, 396, 296)
GUISetState(@SW_SHOW)
; Add files
_GUICtrlComboBox_AddDir($idCombo, "", $DDL_DRIVES, False)
; Add string
_GUICtrlComboBox_AddString($idCombo, "This string has been added")
; Loop until the user exits.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example