ComboBox Startwert löschen

  • AAARG darf doch echt nich wahr sein.. wahrscheinlich is das total einfach aber ich hab kein plan wie! sry

    ALSO! ich hab ein GUI mit einer Combobox. 3 Einträge.... Male, Female, Other.... Als Startwert soll die Combobox anzeigen "I am..."
    Soll für ne Registrierung sein..
    Wenn ich bei "GUICtrlCreateCombo ("I am..." ............) reinschreibe.. dann soll das später aber nicht mehr in der auswahl drin sein.
    hab schon geguckt.. ob man den einfach löscht wenn die control angeklickt wird mit setonevent und so.. aber geht nicht.
    und AAAA verzweifelt-..

    wie mach ich das!

  • GUICtrlSetData() ja und weiter??
    ich möchte einen Wert löschen..
    Geht mit _GUICtrlComboBoxEx_DeleteString aber WIE??? das löscht ja alle .. wie kann ich 1 Wert löschen..

    Oder die Combobox auf "Anklicken" überprüfen

    • Offizieller Beitrag

    Schau mal hier:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <MsgBoxConstants.au3>

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

    Example()

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

    Func Example()
    ; Create a GUI with various controls.
    Local $hGUI = GUICreate("Example", 300, 200)

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

    ; Create a combobox control.
    Local $iComboBox = GUICtrlCreateCombo("I am Male", 10, 10, 185, 20)
    Local $iClose = GUICtrlCreateButton("Close", 210, 170, 85, 25)

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

    ; Add additional items to the combobox.
    GUICtrlSetData($iComboBox, "I am Female|I am Other", "I am Male")

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

    ; Display the GUI.
    GUISetState(@SW_SHOW, $hGUI)

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

    Local $sComboRead = ""

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

    ; Loop until the user exits.
    While 1
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE, $iClose
    ExitLoop

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

    Case $iComboBox
    $sComboRead = GUICtrlRead($iComboBox)
    MsgBox($MB_SYSTEMMODAL, "", "Deine Auswahl: " & StringTrimLeft($sComboRead, 5), 0, $hGUI)

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

    EndSwitch
    WEnd

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

    ; Delete the previous GUI and all controls.
    GUIDelete($hGUI)
    EndFunc ;==>Example

    [/autoit]


    Damit hast du die Lösung für beide Fragen.
    !. Wie fängst du den Event von der ComboBox ab.
    2. Wie kürzt du den Rückgabestring der Combo, das nur Male,Female oder Other rauskommt,