GUICtrlSetTip macht Probleme

  • Hallo,
    wieso funktioniert GUICtrlSetTip nicht bei einem Input was den Status hat $GUI_DISABLE ?

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 409, 247, 192, 124)
    GUICtrlSetTip (-1,"Form")
    $Input1 = GUICtrlCreateInput("Input1", 8, 8, 121, 21)
    GUICtrlSetTip (-1,"Input1")
    $Input2 = GUICtrlCreateInput("Input2", 264, 144, 121, 21)
    GUICtrlSetTip (-1,"Input2")
    GUICtrlSetState (-1,$GUI_DISABLE)
    $Button1 = GUICtrlCreateButton("Button1", 136, 8, 75, 25)
    GUICtrlSetTip (-1,"Button1")
    $Edit1 = GUICtrlCreateEdit("", 8, 40, 185, 89)
    GUICtrlSetData(-1, "Edit1")
    GUICtrlSetTip (-1,"Edit1")
    $Group1 = GUICtrlCreateGroup("Group1", 216, 8, 185, 105)
    GUICtrlSetTip (-1,"Group1")
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $List1 = GUICtrlCreateList("", 8, 136, 121, 97)
    GUICtrlSetTip (-1,"List")
    $Pic1 = GUICtrlCreatePic("", 144, 136, 100, 100)
    GUICtrlSetTip (-1,"Pic")
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    EndSwitch
    WEnd

    [/autoit]

    mfg Freaky

  • Hallo Freaky,

    ist doch logisch, dass ein disabled Control keine Aktion auslösen kann. Wird imho auch nicht benötigt, denn wenn der Anwender nichts eingeben darf, muss er auch nicht wissen was er hier eineben soll. Nichts, das erkennt er ja schon am Status. Wenn du es unbedingt möchtest musst du dir einen Workaround ala onHover
    schreiben,

    mfg (Auto)Bert

    • Offizieller Beitrag

    Wenn du die Input 2 nur zur Anzeige benutzen willst kannst du es so machen:

    Spoiler anzeigen
    [autoit]

    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 409, 247, 192, 124)
    GUICtrlSetTip (-1,"Form")
    $Input1 = GUICtrlCreateInput("Input1", 8, 8, 121, 21)
    GUICtrlSetTip (-1,"Input1")
    $Input2 = GUICtrlCreateInput("Input2", 264, 144, 121, 21,$ES_READONLY)
    GUICtrlSetTip (-1,"Input2")
    ;~ GUICtrlSetState (-1,$GUI_DISABLE)
    $Button1 = GUICtrlCreateButton("Button1", 136, 8, 75, 25)
    GUICtrlSetTip (-1,"Button1")
    $Edit1 = GUICtrlCreateEdit("", 8, 40, 185, 89)
    GUICtrlSetData(-1, "Edit1")
    GUICtrlSetTip (-1,"Edit1")
    $Group1 = GUICtrlCreateGroup("Group1", 216, 8, 185, 105)
    GUICtrlSetTip (-1,"Group1")
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $List1 = GUICtrlCreateList("", 8, 136, 121, 97)
    GUICtrlSetTip (-1,"List")
    $Pic1 = GUICtrlCreatePic("", 144, 136, 100, 100)
    GUICtrlSetTip (-1,"Pic")
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    EndSwitch
    WEnd

    [/autoit]