joell Posted May 10, 2008 Share Posted May 10, 2008 Hi, Just wonder if it's a new way of handling tabs for new release. If you create two (or more) windows with a tab in each window, selecting a tabitem in one window will change to the same tabitem number in the other window (if exists). This was not the case in last release. It this a bug or it there a new way to manage tabs in different windows? Someone have an idea? following script is based on the example found in AutoIt Help. Just added a second window and changed GUIOnEventMode expandcollapse popup#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 Regards, Joell registry victim Link to comment Share on other sites More sharing options...
martin Posted May 10, 2008 Share Posted May 10, 2008 Hi, Just wonder if it's a new way of handling tabs for new release. If you create two (or more) windows with a tab in each window, selecting a tabitem in one window will change to the same tabitem number in the other window (if exists). This was not the case in last release. It this a bug or it there a new way to manage tabs in different windows? Someone have an idea? following script is based on the example found in AutoIt Help. Just added a second window and changed GUIOnEventMode expandcollapse popup#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 Regards, Joell I agree that there is this problem with 3.2.11.10, I haven't tried with latest Beta yet. Which version are you referring to? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
joell Posted May 10, 2008 Author Share Posted May 10, 2008 I agree that there is this problem with 3.2.11.10, I haven't tried with latest Beta yet. Which version are you referring to?Hi Martin,I found the problem with 3.2.11.12 yesterday and tried with 3.2.11.10 with same effect. I fetched today the rc1 and still found the problem.Regards, registry victim Link to comment Share on other sites More sharing options...
Administrators Jon Posted May 10, 2008 Administrators Share Posted May 10, 2008 I've just added this bug to Trac: http://svn.autoitscript.com/trac/ticket/256Thanks. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now