Combo Dropdown nicht größer als GUI

  • Hallo com,

    ich möchte gerne das meine Combobox nicht größer als meine GUI wird (also wenn sich das Dropdown Menü öffnet), ich hoffe ihr könnt mir weiterhelfen. Schreibt zum Test einfach mal oben in der Inputbox Hello rein :|

    Hier mein Script:

    Spoiler anzeigen
    [autoit]

    #include <GUIComboBox.au3>
    #include <GuiConstantsEx.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Dim $aItems[23]
    $aItems[0] = "Hello"
    $aItems[1] = "Hello2"
    $aItems[2] = "Hello3"
    $aItems[3] = "Maus"
    $aItems[4] = "sieht"
    $aItems[5] = "man"
    $aItems[6] = "Hello"
    $aItems[7] = "Hello"
    $aItems[8] = "Hello"
    $aItems[9] = "Hello"
    $aItems[10] = "Hello"
    $aItems[11] = "Hello"
    $aItems[12] = "Hello2"
    $aItems[13] = "Hello3"
    $aItems[14] = "Hello"
    $aItems[15] = "Hello2"
    $aItems[16] = "Hello3"
    $aItems[17] = "Hello"
    $aItems[18] = "Hello2"
    $aItems[19] = "Hello3"
    $aItems[20] = "Hello"
    $aItems[21] = "Hello2"
    $aItems[22] = "Hello3"

    [/autoit] [autoit][/autoit] [autoit]

    $hGUI = GUICreate("Drop-down",700,300)
    $hInput = GUICtrlCreateInput("",0,0,400,20)
    $hCombo = GUICtrlCreateCombo("",0,40,400,50, BitOR(0x00200000, 0x3))
    ;$hCheckbox = GUICtrlCreateCheckbox("Groß-/Kleinschreibung beachten",0,20,125,20)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    GUISetState()

    [/autoit] [autoit][/autoit] [autoit]

    $read = GUICtrlRead($hInput)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    If GUICtrlRead($hInput) <> $read Then
    $read = GUICtrlRead($hInput)
    $all = ""

    For $i = 0 To UBound($aItems)-1
    ; If GUICtrlRead($hCheckbox) <> $GUI_CHECKED Then
    ; $sCaseSensitive = 0
    ; Else
    ; $sCaseSensitive = 1
    ; EndIf

    If StringInStr($aItems[$i],GUICtrlRead($hInput)) <> 0 Then
    $all = $all & "|" & $aItems[$i] & "|" & $aItems[$i]
    EndIf
    Next

    GUICtrlSetData($hCombo, $all)
    _GUICtrlComboBox_ShowDropDown($hCombo, True)
    EndIf
    WEnd

    [/autoit]

    Bin für jede hilfreiche Antwort dankbar.

    Mit freundlichen Grüßen
    Christian

    Einmal editiert, zuletzt von blacky94 (5. Dezember 2011 um 14:39)

  • mit

    [autoit]

    _GUICtrlComboBox_SetMinVisible($hCombo, 10)

    [/autoit]


    setzt du die Anzahl an Items, die angezeigt werden können, wenn es mehr Items sind kommen die Scrollbalken.