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
#include <GUIConstantsEx.au3>
#include <TabConstants.au3>
#include <GuiTab.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$MainGui = GUICreate("Server-Tool", 992, 714, 297, 182)
GUISetFont(10, 800, 0, "Arial Narrow")
$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")
$ServerSubTab = _GUICtrlTab_Create($MainTab, 10, 27, 975, 680)
_GUICtrlTab_InsertItem($ServerSubTab, 0, "Control")
_GUICtrlTab_InsertItem($ServerSubTab, 1, "Properties")
_GUICtrlTab_InsertItem($ServerSubTab, 2, "Plugins")
#cs
$TabMain = GUICtrlCreateTab(0, 0, 1024, 749)
$ServerSubTab = GUICtrlCreateTabItem("Server")
GUICtrlCreateTabItem("")
$PropertiesTab = GUICtrlCreateTab(0, 0, 1024, 749)
$PropertiesItem = GUICtrlCreateTabItem("Properties")
GUICtrlCreateTabItem("")
$PremiumAccountTab = GUICtrlCreateTabItem("Premium-Account")
$FileManagementTab = GUICtrlCreateTabItem("File-Management")
$SettingsItem = GUICtrlCreateMenu("&Settings")
$AboutItem = GUICtrlCreateMenu("&About")#
#ce
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$Msg = GUIGetMsg()
Switch (_GUICtrlTab_GetCurSel($MainTab))
Case 0
ControlShow("","",$ServerSubTab)
Case 1
ControlHide("","",$ServerSubTab)
Case 2
ControlHide("","",$ServerSubTab)
EndSwitch
Switch $Msg
Case $GUI_EVENT_CLOSE
_exit()
EndSwitch
WEnd
Func _exit()
Exit
EndFunc
Func GetDlgCtrlID($hwndCtl)
Local $aRes = DllCall("user32.dll", 'int', 'GetDlgCtrlID','hwnd', $hwndCtl)
Return $aRes[0]
EndFunc