Gruppe oder Bereich in GUI scrollen

  • Ich hab eine GUI, in der einige Gruppen sind!
    In mache der Gruppen will ich mehr Inhalt rein packen, als es die Größe zu lässt, deshalb möchte ich diese Gruppe, unabhängig vom Rest, scrollbar machen!
    In diese Gruppe kommt ein Bild, Text, und Checkboxen rein ...

    ist so etwas ohne weiteres Möglich?
    Wenn dann wie?

    Mir fällt nur ein, dass ich eine zweite GUI quasi auf die Haupt-GUI aufsetzte und die zweite GUI komplett scollbar mache (so wie ich es schon in anderen Thread hier im Forum gesehen habe)!?
    Ist das die einzige Möglichkeit oder geht das noch eleganter?

    thx

  • Hallo Chrys,

    bei meinen bisherigen kurzen Tests konnte ich zwar Scrollbalken in einer Group erzeugen konnte diese aber weder mit #include <GUIScrollBars.au3> noch mit #include <GUIScroll.au3> (im Anhang) scrollen.
    Schau dir auch [ offen ] Edit`s an,

    mfg (Auto)Bert

  • hm, entweder meinst du nicht das selbe wie ich oder ich steh komplett aufn Schlauch ...

    Hier mal ein Beispiel Skript:

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 441, 441, 508, 269)
    $Group1 = GUICtrlCreateGroup("Group1", 10, 10, 200, 200)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group4 = GUICtrlCreateGroup("Group4", 220, 220, 200, 200)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group2 = GUICtrlCreateGroup("Group2", 220, 10, 200, 200)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group3 = GUICtrlCreateGroup("Group3", 10, 220, 200, 200)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    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]

    Es soll darin z.B. nur der Inhalt von Group2 gescollt werden, nicht die ganze GUI!

    Wenn du das selbe gemeint hast, dann bitte ich noch um einen kurze Erklärung ...

  • Hallo Chrys,

    ich habe mal mit einer HilfsGui Radios in der 2. Group platziert:

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <GuiScroll.au3>

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

    Dim $idRadio2[100]
    #Region ### START Koda GUI section ### Form=

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

    $Form1 = GUICreate("Form1", 441, 441, 508, 269)
    $Group1 = GUICtrlCreateGroup("Group1", 10, 10, 200, 200)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group4 = GUICtrlCreateGroup("Group4", 220, 220, 200, 200)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group2 = GUICtrlCreateGroup("Group2", 220, 10, 200, 200)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $hGroup2 = GUICreate("",170,170,235,25,BitOR($WS_POPUP, $WS_GROUP, $WS_VSCROLL, $WS_CLIPSIBLINGS),$WS_EX_MDICHILD,$Form1)
    for $i = 0 to 99
    $idRadio2[$i] = GUICtrlCreateRadio("Radio " & $i, 5, $i*25, 60, 18)
    Next
    GUISetState(@SW_SHOW)
    GUISwitch($Form1)
    $Group3 = GUICtrlCreateGroup("Group3", 10, 220, 200, 200)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    Scrollbar_Create($hGroup2, $SB_VERT, $i*25)
    Scrollbar_Step(20, $hGroup2, $SB_VERT)

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

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

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

    EndSwitch
    WEnd

    [/autoit]

    mfg (Auto)Bert

  • Hi,

    ich hab dir im anderen Thread (den du ausgegraben hast) einen Link geschrieben zu einem anderen Thread,
    der genau das Thema mit Steuern des Scrollbalkens mittels Mausrad oder Pfeiltasten.

    Kannst dich auch direkt mit mir in Verbindung setzen.

    Gruß

    Prajoss

    "Never touch a running System!"

  • Ich möche nur noch den Thread als gelöst ändern und posten, wie das scollen der GUI dank Prajoss funktiononiert hat!

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <GuiScroll.au3>

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

    ;~ Global Const $WM_MOUSEWHEEL = 0x020A

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

    GUIRegisterMsg($WM_SIZE, "WM_SIZE")
    GUIRegisterMsg($WM_VSCROLL, "WM_VSCROLL")
    GUIRegisterMsg($WM_MOUSEWHEEL, "_Mausrad")

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

    Dim $idRadio2[100]
    #Region ### START Koda GUI section ### Form=

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

    $Form1 = GUICreate("Form1", 441, 441, 508, 269)
    $Group1 = GUICtrlCreateGroup("Group1", 10, 10, 200, 200)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group4 = GUICtrlCreateGroup("Group4", 220, 220, 200, 200)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group2 = GUICtrlCreateGroup("Group2", 220, 10, 200, 200)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $hGroup2 = GUICreate("",170,170,235,25,BitOR($WS_POPUP, $WS_GROUP, $WS_VSCROLL, $WS_CLIPSIBLINGS),$WS_EX_MDICHILD,$Form1)
    for $i = 0 to 99
    $idRadio2[$i] = GUICtrlCreateRadio("Radio " & $i, 5, $i*25, 60, 18)
    Next
    GUISetState(@SW_SHOW)
    GUISwitch($Form1)
    $Group3 = GUICtrlCreateGroup("Group3", 10, 220, 200, 200)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    Scrollbar_Create($hGroup2, $SB_VERT, $i*25)
    Scrollbar_Step(20, $hGroup2, $SB_VERT)

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

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

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

    EndSwitch
    WEnd

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

    Func _Mausrad($hWnd, $Msg, $wParam)
    #forceref $Msg, $wParam

    If $wParam == "0x00780000" Then _Bild_rauf()

    If $wParam == "0xFF880000" Then _Bild_runter()

    EndFunc

    Func _Bild_runter()

    for $i = 0 To 4 Step 1
    WM_VSCROLL($hGroup2, 0x0, 0x00000001, 0) ;1 mal kurz nach oben Scrollen - selber Effekt wie auf den Pfeil klicken
    Next

    EndFunc

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

    Func _Bild_rauf()

    for $i = 0 To 4 Step 1
    WM_VSCROLL($hGroup2, 0x0, 0x00000000, 0) ;1 mal kurz nach unten Scrollen - selber Effekt wie auf den Pfeil klicken
    Next

    EndFunc

    [/autoit]

    Dies funktioniert aber auch nur unter einem als x86 kompilierten oder gestarteten Skript, nicht unter x64!

  • Hallo zusammen,

    ich habe das Thema bereits in einen anderen Beitrag vor x-Wochen mal angefragt, leider keine Antwort erhalten da der Bug scheinbar nur bei mir in der Firma auftritt.

    Wenn ich eure Beispiele (oder mein Script öffne) und das Fenster verschieben bleibt die innere gui (die Scrollgui) stehen, nur das hauptfenster wird verschoben.
    lässt man dann die Maustaste wieder los ist der inhalt der innerne gui leer, fährt man mit der maus drüber öffnen sich danach die einzelnen inhalt.
    Oft bleiben aber Grafikkartenbugs zurück, wie im foto ....

    das einzige was hilft:

    [autoit]


    $pos_gui = WinGetPos("Fenster")

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

    If $pos_gui2[1] <> $pos_gui[1] or $pos_gui2[2] <> $pos_gui[2] or $pos_gui2[3] <> $pos_gui[3] or $pos_gui2[0] <> $pos_gui[0] Then
    If $msg = -11 Then
    $pos_gui2[1] = $pos_gui[1]
    $pos_gui2[2] = $pos_gui[2]
    $pos_gui2[3] = $pos_gui[3]
    $pos_gui2[0] = $pos_gui[0]

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

    WinSetState("ACA","",@SW_MINIMIZE )
    WinSetState("ACA","",@SW_RESTORE)
    EndIf
    EndIf

    [/autoit]