Pic behindert Controls

  • Ich will eine GUI mit einem Hintergrundbild haben.
    Wenn ich aber GUICtrlCreatePic() auf der gesamten GUI-Oberfläche benutze, sind alle anderen Controls 'tot'.
    Zwischen den Inputs kann man zwar noch per Tab wechseln,
    aber mit der Maus kann man eben nichts mehr anklicken (Inputs, Buttons usw).

    Ich könnte das Bild natürlich zerschnippeln und um die Controls positionieren,
    aber das wäre eine ziemlich dumme Lösung...

    Hat da jemand bessere Vorschläge?

    MfG

    Einmal editiert, zuletzt von $var (26. Juni 2011 um 23:54)

  • Spoiler anzeigen
    [autoit]

    #include <GuiConstants.au3>

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

    Global $Dummy

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

    Global Const $Title = "Test"
    Global Const $Width = 580
    Global Const $Height = 230
    Global Const $BgColor = 0x000000
    Global Const $FontSize = 8.5
    Global Const $Font = "Tahoma"
    Global Const $FontColor = 0xFFFFFF
    Global Const $BG = @DesktopDir & "\background.bmp"

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

    $GUI = GUICreate ($Title, $Width, $Height, -1, -1)
    GUISetBkColor($BgColor)
    GUISetFont($FontSize, 400, 0, $Font)
    GUICtrlCreatePic ($BG, 0, 0, 580, 230)
    GUICtrlCreateInput ("Input 1", 30, 50, 190, 19)
    GUICtrlCreateInput ("Input 2", 30, 79, 190, 19)
    GUICtrlCreateInput ("Input 3", 30, 140, 190, 28)
    GUICtrlSetFont (-1, 13)
    $Button = GUICtrlCreateButton ("Button 1", 80, 180, 90, 20)

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

    GUISetState (@SW_SHOW)

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

    While 1
    Switch GUIGetMsg ()
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Dummy
    EndSwitch
    WEnd

    [/autoit]
  • du musst das pic disablen...

    Spoiler anzeigen
    [autoit]

    #include <GuiConstants.au3>

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

    Global $Dummy

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

    Global Const $Title = "Test"
    Global Const $Width = 580
    Global Const $Height = 230
    Global Const $BgColor = 0x000000
    Global Const $FontSize = 8.5
    Global Const $Font = "Tahoma"
    Global Const $FontColor = 0xFFFFFF
    Global Const $BG = @DesktopDir & "\background.bmp"

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

    $GUI = GUICreate ($Title, $Width, $Height, -1, -1)
    GUISetBkColor($BgColor)
    GUISetFont($FontSize, 400, 0, $Font)
    GUICtrlCreatePic ($BG, 0, 0, 580, 230)
    GUICtrlSetState(-1, $GUI_DISABLE)
    GUICtrlCreateInput ("Input 1", 30, 50, 190, 19)
    GUICtrlCreateInput ("Input 2", 30, 79, 190, 19)
    GUICtrlCreateInput ("Input 3", 30, 140, 190, 28)
    GUICtrlSetFont (-1, 13)
    $Button = GUICtrlCreateButton ("Button 1", 80, 180, 90, 20)

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

    GUISetState (@SW_SHOW)

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

    While 1
    Switch GUIGetMsg ()
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Dummy
    EndSwitch
    WEnd

    [/autoit]

    MfG Schnuffel

    "Sarkasmus ist die niedrigste Form des Witzes, aber die höchste Form der Intelligenz."
    Val McDermid

    ein paar Infos ...

    Wer mehr als "nur" Hilfe benötigt, kann sich gern im Forum "Programmieranfragen" an uns wenden. Wir helfen in allen Fällen, die die Forenregeln zulassen.

    Für schnelle Hilfe benötigen wir ein ! lauffähiges ! Script, dass wir als Demonstration des Problems testen können. Wer von uns erwartet ein Teilscript erstmal lauffähig zu bekommen, der hat
    1. keine wirkliche Not
    2. keinen Respekt vor Menschen die ihm in ihrer Freizeit Ihre Hilfe anbieten
    3. oder ist einfach nur faul und meint wir coden das für ihn

    In solchen Fällen erlaube ich mir, die Anfrage einfach zu ignorieren. ;)