Ermittelt alle Items eines ComboBox Controls
#Include <GuiComboBoxEx.au3>
_GUICtrlComboBoxEx_GetListArray($hWnd)
Parameter
| $hWnd | Handle des Controls |
Rückgabewert
Erfolg: Array in dem folgenden Format:
Bemerkungen
- - - - - - - - Erklärung der Controls - - - - - - - -
Verwandte Funktionen
_GUICtrlComboBoxEx_GetList
Beispiel
#include <GuiComboBoxEx.au3>
#include <GuiConstantsEx.au3>
#include <Constants.au3>
Opt('MustDeclareVars', 1)
$Debug_CB = False ; Prüft den Klassennamen (ClassName), der an die ComboBox/ComboBoxEx-Funktion übergeben wird. Setze dies versuchsweise auf True und verwende dann ein Handle zu einem anderen Control, um die Funktionsweise zu verstehen.
Global $iMemo
_Main()
Func _Main()
Local $hGUI, $aItem, $hCombo
; Erstellt eine GUI
$hGUI = GUICreate("ComboBoxEx: Ermittelt alle Items", 400, 300)
$hCombo = _GUICtrlComboBoxEx_Create($hGUI, "", 2, 2, 394, 100)
$iMemo = GUICtrlCreateEdit("", 2, 32, 396, 266, 0)
GUICtrlSetFont($iMemo, 9, 400, 0, "Courier New")
GUISetState()
; Fügt Dateien hinzu
_GUICtrlComboBoxEx_AddDir($hCombo, "", $DDL_DRIVES, False)
; Ermittelt alle Items
$aItem = _GUICtrlComboBoxEx_GetListArray($hCombo)
For $x = 1 To $aItem[0]
MemoWrite($aItem[$x])
Next
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc ;==>_Main
; Gibt eine Zeile im Memo-Fenster aus
Func MemoWrite($sMessage)
GUICtrlSetData($iMemo, $sMessage & @CRLF, 1)
EndFunc ;==>MemoWrite