tab + subtab

    • Offizieller Beitrag

    Hi,

    Spoiler anzeigen
    [autoit][/autoit] [autoit][/autoit] [autoit]

    #include <GUIConstants.au3>

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

    $Main_Gui = GUICreate("My GUI Tab", 500, 500) ; will create a dialog box that when displayed is centered
    $Child_Gui = GUICreate("Child Gui", 480, 460, 15, 35, BitOR($WS_CHILD, $WS_TABSTOP), -1, $Main_Gui)

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

    $child_tab = GUICtrlCreateTab(10, 10, 470, 450)
    $c_tab0 = GUICtrlCreateTabItem("c_tab0")
    $button = GUICtrlCreateButton("test button", 20, 40, 120, 25)
    $c_tab1 = GUICtrlCreateTabItem("c_tab1")
    GUICtrlCreateTabItem("") ; end tabitem definition

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

    GUISwitch($Main_Gui)

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

    GUISetBkColor(0x00E0FFFF)
    GUISetFont(9, 300)

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

    $tab = GUICtrlCreateTab(10, 10, 490, 490)

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

    $tab0 = GUICtrlCreateTabItem("tab0")
    GUICtrlCreateLabel("label0", 30, 80, 50, 20)
    $tab0OK = GUICtrlCreateButton("OK0", 20, 50, 50, 20)
    $tab0input = GUICtrlCreateInput("default", 80, 50, 70, 20)

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

    $tab1 = GUICtrlCreateTabItem("tab----1")
    GUICtrlCreateLabel("label1", 30, 80, 50, 20)
    $tab1combo = GUICtrlCreateCombo("", 20, 50, 60, 120)
    GUICtrlSetData(-1, "Trids|CyberSlug|Larry|Jon|Tylo", "Jon") ; default Jon
    $tab1OK = GUICtrlCreateButton("OK1", 80, 50, 50, 20)

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

    $tab2 = GUICtrlCreateTabItem("tab2")
    GUICtrlSetState(-1, $GUI_SHOW) ; will be display first
    GUICtrlCreateLabel("label2", 30, 80, 50, 20)
    $tab2OK = GUICtrlCreateButton("OK2", 140, 50, 50)

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

    $tab3 = GUICtrlCreateTabItem("tab3")

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

    GUICtrlCreateTabItem("") ; end tabitem definition

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

    GUISetState()

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

    ; Run the GUI until the dialog is closed
    While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
    ExitLoop
    Case $msg = $tab
    If GUICtrlRead($tab) = 3 Then
    GUISetState(@SW_SHOW, $Child_Gui)
    Else
    GUISetState(@SW_HIDE, $Child_Gui)
    EndIf
    EndSelect

    WEnd

    [/autoit]

    So long,

    Mega

  • es klappt,
    10 Minuten fuer eine top Antwort.
    So hat man es gerne...... :stolz_bin:

    Hab mir deswegen vorher Stunden um die Ohren gehauen.
    Schade, dass die GUI das noch nicht hinbekommt.
    Oder etwa doch?

  • vielen Dank noch mal an Mega.
    Ich benutze dieses in einem Prograemmchen, das
    saemtliche Soll-Einstellungen (Variablen & Arrays) an eine *.ini
    übergibt.
    Diese werden dann von einem zweitem Programm ausgewertet,
    das dann entsprechend reagiert.
    Plan B war, dass ich es in Flash mache. Aber jetzt klappt es ja auch so...

    Gruss @Berti