﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
256	Multiple windows and tab controls	Jon	Jon	"With multiple windows and tab controls when you select a tab on one window the controls on BOTH windows change.

{{{
#include <GUIConstantsEx.au3>

Opt('MustDeclareVars', 1)
Opt(""GUIOnEventMode"", 1)

Global $ex1winh, $ex2winh, $btn, $btn2, $tab, $othertab

Example()
Win2()
Main()
Exit

Func Main()
While 1
        Sleep(200)
WEnd
EndFunc;==>Main

Func Example()
    Local $tab0, $tab0OK, $tab0input
    Local $tab1, $tab1combo, $tab1OK
    Local $tab2, $tab2OK, $msg
    
   $ex1winh        =     GUICreate(""My GUI Tab"",300,200,50,50) 
                    GuiSetOnEvent($GUI_EVENT_CLOSE, ""evtClose"")

                    GUISetBkColor(0x00E0FFFF)
                    GUISetFont(9, 300)

    $tab         =     GUICtrlCreateTab(10, 10, 200, 100)

    $tab0         =     GUICtrlCreateTabItem(""tab0"")
                    GUICtrlCreateLabel(""label0"", 30, 80, 50, 20)
    $tab0OK     =     GUICtrlCreateButton(""OK0"", 20, 50, 50, 20)
                    GUICtrlSetOnEvent(-1,""fake"")
    
    $tab0input     =     GUICtrlCreateInput(""default?"", 80, 50, 70, 20)

    $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)

    $tab2         =    GUICtrlCreateTabItem(""tab2"")
                    GUICtrlSetState(-1, $GUI_SHOW) ; will be display first
                    GUICtrlCreateLabel(""label2"", 30, 80, 50, 20)
    $tab2OK     =    GUICtrlCreateButton(""OK2"", 140, 50, 50)

                    GUICtrlCreateTabItem("""")   ; end tabitem definition
                    GUICtrlCreateLabel(""label3"", 20, 130, 50, 20)

    GUISetState()

EndFunc  ;==>Example

Func Win2()
    Local $tab0, $tab0OK, $tab0input
    Local $tab1, $tab1combo, $tab1OK
    Local $tab2, $tab2OK, $msg
    Local $tab3, $tab3OK
    ConsoleWrite(""call btn"" & @LF)
   $ex2winh        =     GUICreate(""My 2nd GUI Tab"",300,200,200,200)
                    GuiSetOnEvent($GUI_EVENT_CLOSE, ""evtClose"")

                    GUISetBkColor(0x00E0FFFF)
                    GUISetFont(9, 300)

    $othertab         =     GUICtrlCreateTab(10, 10, 200, 100)

    $tab0         =     GUICtrlCreateTabItem(""otab0"")
                    GUICtrlCreateLabel(""label0"", 30, 80, 50, 20)
    $tab0OK     =     GUICtrlCreateButton(""OK0"", 20, 50, 50, 20)
    
    $tab0input     =     GUICtrlCreateInput(""?default"", 80, 50, 70, 20)

    $tab1         =     GUICtrlCreateTabItem(""otab----1"")
                    GUICtrlCreateLabel(""label1"", 30, 80, 50, 20)
    $tab1combo     =     GUICtrlCreateCombo("""", 20, 50, 60, 120)
                    GUICtrlSetData(-1, ""Trids|CyberSlug|Larry|Jon|Tylo"", ""CyberSlug""); default Jon
    $tab1OK     =    GUICtrlCreateButton(""OK1"", 80, 50, 50, 20)

    $tab2         =    GUICtrlCreateTabItem(""otab2"")
                    GUICtrlSetState(-1, $GUI_SHOW) ; will be display first
                    GUICtrlCreateLabel(""label2"", 30, 80, 50, 20)
    $tab2OK     =    GUICtrlCreateButton(""OK2"", 140, 50, 50)

    $tab3         =    GUICtrlCreateTabItem(""otab3"")
                    GUICtrlSetState(-1, $GUI_SHOW) ; will be display first
                    GUICtrlCreateLabel(""label3"", 30, 80, 50, 20)
    $tab3OK     =    GUICtrlCreateButton(""OK3"", 140, 50, 50)

                    GUICtrlCreateTabItem("""")   ; end tabitem definition
                    GUICtrlCreateLabel(""label3"", 20, 130, 50, 20)

    GUISetState()

EndFunc  ;==>Example2

func fake()
; insert code here
EndFunc ;==>fake

Func evtClose()
        GUIDelete(@GUI_WINHANDLE)
        Exit
EndFunc;==>evtClose
}}}"	Bug	closed	3.2.13.0	AutoIt	3.2.11.12	Blocking	Fixed	gui tab	
