Controls in Tab erzeugen

  • Hallo, wie kann ich Controls erzeugen, die dann nur in einem Untertab angezeigt werden?
    Ich möchte z.B. einen Button im Control-Reiter.
    Das ist mein Code:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <TabConstants.au3>
    #include <GuiTab.au3>
    #include <WindowsConstants.au3>

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

    #Region ### START Koda GUI section ### Form=
    $MainGui = GUICreate("Server-Tool", 992, 714, 297, 182)
    GUISetFont(10, 800, 0, "Arial Narrow")

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

    $MainTab = _GUICtrlTab_Create($MainGui, 0, 0, 1024, 749)
    _GUICtrlTab_InsertItem($MainTab, 0, "Server")
    _GUICtrlTab_InsertItem($MainTab, 1, "File-Management")
    _GUICtrlTab_InsertItem($MainTab, 2, "Premium-Account")

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

    $ServerSubTab = _GUICtrlTab_Create($MainTab, 10, 27, 975, 680)
    _GUICtrlTab_InsertItem($ServerSubTab, 0, "Control")
    _GUICtrlTab_InsertItem($ServerSubTab, 1, "Properties")
    _GUICtrlTab_InsertItem($ServerSubTab, 2, "Plugins")

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

    #cs
    $TabMain = GUICtrlCreateTab(0, 0, 1024, 749)

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

    $ServerSubTab = GUICtrlCreateTabItem("Server")
    GUICtrlCreateTabItem("")
    $PropertiesTab = GUICtrlCreateTab(0, 0, 1024, 749)
    $PropertiesItem = GUICtrlCreateTabItem("Properties")
    GUICtrlCreateTabItem("")

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

    $PremiumAccountTab = GUICtrlCreateTabItem("Premium-Account")
    $FileManagementTab = GUICtrlCreateTabItem("File-Management")
    $SettingsItem = GUICtrlCreateMenu("&Settings")
    $AboutItem = GUICtrlCreateMenu("&About")#
    #ce

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

    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $Msg = GUIGetMsg()

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

    Switch (_GUICtrlTab_GetCurSel($MainTab))
    Case 0
    ControlShow("","",$ServerSubTab)
    Case 1
    ControlHide("","",$ServerSubTab)
    Case 2
    ControlHide("","",$ServerSubTab)
    EndSwitch

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

    Switch $Msg
    Case $GUI_EVENT_CLOSE
    _exit()
    EndSwitch
    WEnd

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

    Func _exit()
    Exit
    EndFunc

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

    Func GetDlgCtrlID($hwndCtl)
    Local $aRes = DllCall("user32.dll", 'int', 'GetDlgCtrlID','hwnd', $hwndCtl)
    Return $aRes[0]
    EndFunc

    [/autoit]
    [autoit]


    Func Ulam($n)
    Return 1
    EndFunc

    [/autoit]


    Rekursion FTW :D

  • Danke, aber ich glaube ich machs einfach nur mit einem Tab-Menü.
    Wer die Lösung hat, kann sie natürlich noch posten.

    [autoit]


    Func Ulam($n)
    Return 1
    EndFunc

    [/autoit]


    Rekursion FTW :D