Hallo Forum,
anbei ein Script Code
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <GuiConstantsEx.au3>
#include <GuiTab.au3>
$Form1 = GUICreate("Form1", 800, 650, 188, 103)
$Tab1 = GUICtrlCreateTab(184, 24, 600, 600)
_TABInsertData()
$Button1 = GUICtrlCreateButton("BTN_1 _TabInsertData", 16, 72, 129, 25, -1, BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
$Button2 = GUICtrlCreateButton("BTN_2 _TabVersuch", 16, 104, 129, 25, -1, BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
$Button3 = GUICtrlCreateButton("BTN_3 _Reset", 16, 136, 129, 25, -1, BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_GUICtrlTab_DeleteAllItems($Tab1)
_TABInsertData()
Case $Button2
_GUICtrlTab_DeleteAllItems($Tab1)
_TABVersuch()
Case $Button3
_GUICtrlTab_DeleteAllItems($Tab1)
EndSwitch
WEnd
Func _TABInsertData()
$TabSheet1 = GUICtrlCreateTabItem("TAB 1")
_InputDaten()
$TabSheet2 = GUICtrlCreateTabItem("TAB 2")
_InputDaten()
$TabSheet3 = GUICtrlCreateTabItem("TAB 3")
GUICtrlCreateTabItem("")
EndFunc ; _TABInsertData
Func _InputDaten()
$Combo1 = GUICtrlCreateCombo("", 300, 121, 57, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL), $WS_EX_CLIENTEDGE)
GUICtrlSetState(-1, $GUI_ENABLE)
$Input1 = GUICtrlCreateInput("", 420, 281, 89, 21)
GUICtrlSetState(-1, $GUI_ENABLE)
$LabelCombo1 = GUICtrlCreateLabel("Combo1", 220, 121, 38, 17, $SS_CENTER, $WS_EX_STATICEDGE)
$LabelAlter = GUICtrlCreateLabel("Input1", 372, 281, 25, 17, $SS_CENTER, $WS_EX_STATICEDGE)
EndFunc ; _InputDaten
Func _TABVersuch()
$TabSheet4 = GUICtrlCreateTabItem("TAB 4")
$TabSheet5 = GUICtrlCreateTabItem("TAB 5")
$TabSheet6 = GUICtrlCreateTabItem("TAB 6")
GUICtrlCreateTabItem("")
EndFunc ; _TABVersuch
Das sollte eigentlich folgendes machen:
In TAB 1 das gleich anzeigen wie in TAB 2. Möchte das ganze dann so gestalten dass TAB 1 (GUI_ENABLE) und TAB 2 (GUI_DISABLE) hat.
Nur wird mir das ganze in TAB 5 und 6 auch angezeigt. Und nach dem Reset wird gar nichts in TAB 1 angezeigt( nach Button 3 wieder Button 1 drücken und das Input und die Combo sind wieder weg)
Keine Ahnung warum..guisetstate setzen oder was?
Bitte um Denkanstöße..
mfg
Jogi