Hintergrundbild -> Button ist nichtmehr verwendbar

  • Hallo,
    ich habe erst vor kurzem angefangen, mit AutoIt zu hantieren und heute versuche ich zum 1. Mal ein Hintergrungbild zu verwenden.
    Das Hintergrundbild, die Inputboxes und die zwei Buttons sind sichtbar, allerdings kann ich die Buttons nicht verwenden (ein Klick auf einen der Buttons bringt nichts und wird nichteinmal durch die übliche Umrandung angezeigt)
    Könnte mir bitte jemand helfen, dass die Buttons und Inputboxen wie ohne Hintergrundbild genutzt werden können?

    Dies ist mein Script (Ausschnitt):

    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ###
    $Form2 = GUICreate("Form1", 476, 316, 262, 370)
    $Pic1 = GUICtrlCreatePic("BILD", 0, 0, 473, 313, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $Input1 = GUICtrlCreateInput("Input1", 40, 16, 201, 21)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    GUICtrlSetBkColor(-1, 0x00FFFF)
    $Input = GUICtrlCreateInput("Input2", 8, 104, 169, 21)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    GUICtrlSetBkColor(-1, 0xFFFF00)
    $Button1 = GUICtrlCreateButton("Button1", 320, 184, 131, 33, $WS_GROUP)
    GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
    $Button2 = GUICtrlCreateButton("Button2", 376, 144, 75, 25, $WS_GROUP)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit]

    Vielen Dank im Vorraus!

    Einmal editiert, zuletzt von Spielie (9. Juni 2012 um 11:39)

  • Du mußt ganz einfach das Hintergrundbild "disable" setzen, etwa so:

    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ###
    $Form2 = GUICreate("Form1", 476, 316, 262, 370)
    $Pic1 = GUICtrlCreatePic("BILD", 0, 0, 473, 313, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    GUICtrlSetState($Pic1, $GUI_DISABLE) ; <==== diese Zeile einfügen
    $Input1 = GUICtrlCreateInput("Input1", 40, 16, 201, 21)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    GUICtrlSetBkColor(-1, 0x00FFFF)
    $Input = GUICtrlCreateInput("Input2", 8, 104, 169, 21)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    GUICtrlSetBkColor(-1, 0xFFFF00)
    $Button1 = GUICtrlCreateButton("Button1", 320, 184, 131, 33, $WS_GROUP)
    GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
    $Button2 = GUICtrlCreateButton("Button2", 376, 144, 75, 25, $WS_GROUP)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit]
    UNPLEASANT SPOILER

    You just lost the game!