Begrenzt die Länge des Textes, welchen der Benutzer in das Edit-Control der ComboBox eingeben kann
#include <GuiComboBoxEx.au3>
_GUICtrlComboBoxEx_LimitText ( $hWnd [, $iLimit = 0] )
$hWnd | Handle des Controls |
$iLimit | [optional] neue Längenbegrenzung |
Falls der $iLimit Parameter 0 ist, wird die Textlänge auf 0x7FFFFFFE Zeichen begrenzt.
Falls die ComboBox den Stil $CBS_AUTOHSCROLL nicht besitzt, hat das Setzen des Textlimits auf Werte, die das Limit des Edit-Controls überschreiten, keine Auswirkung.
Die Funktion _GUICtrlComboBox_LimitText() begrenzt nur den Text, der vom Benutzer eingegeben werden kann.
Sie hat weder Einfluss auf den bereits im Edit-Control bestehenden Text, noch auf den ins Edit-Control übertragenen Text, wenn ein Eintrag im ListBox-Control markiert wird.
Die Standardbegrenzung liegt bei 30.000 Zeichen.
- - - - - - - - Erklärung der Controls - - - - - - - -
#include <GuiComboBoxEx.au3>
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
Local $hGui, $hCombo
; Erstellt eine GUI
$hGui = GUICreate("ComboBoxEx: Begrenzt die Länge des Textes", 400, 300)
$hCombo = _GUICtrlComboBoxEx_Create($hGui, "", 2, 2, 394, 100)
GUISetState(@SW_SHOW)
; Fügt Dateien hinzu
_GUICtrlComboBoxEx_BeginUpdate($hCombo)
_GUICtrlComboBoxEx_AddDir($hCombo, "", $DDL_DRIVES, False)
_GUICtrlComboBoxEx_AddDir($hCombo, "", $DDL_DRIVES)
_GUICtrlComboBoxEx_BeginUpdate($hCombo)
_GUICtrlComboBoxEx_AddDir($hCombo, @WindowsDir & "\*.exe")
_GUICtrlComboBoxEx_EndUpdate($hCombo)
_GUICtrlComboBoxEx_EndUpdate($hCombo)
; Begrenzt die Länge des Textes in dem Edit-Control
_GUICtrlComboBoxEx_LimitText($hCombo, 10)
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc ;==>Example