rcmaehl Posted February 1, 2018 Share Posted February 1, 2018 (edited) Hi all, I'm experiencing an issue that even though I've closed the tab structure using GUICtrlCreateTabItem("") It's still adding tabs to the previous tab control. Example code is below: expandcollapse popup#include <Constants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Main() Func Main() Local $hGUI = GUICreate("TestGUI", 640, 480, -1, -1, BitXOR($GUI_SS_DEFAULT_GUI, $WS_MINIMIZEBOX)) GUICtrlCreateTab(0, 0, 280, 300, 0) #Region GUICtrlCreateTabItem("Tab1") #EndRegion #Region GUICtrlCreateTabItem("Tab2") #EndRegion #Region GUICtrlCreateTabItem("Tab3") #EndRegion #Region #cs GUICtrlCreateTabItem("Tab4") #ce #EndRegion #Region GUICtrlCreateTabItem("Tab5") #EndRegion #Region GUICtrlCreateTabItem("Tab6") #EndRegion GUICtrlCreateTabItem("") GUICtrlCreateTab(280, 0, 360, 300) #Region GUICtrlCreateTabItem("NewTab1") #EndRegion #Region GUICtrlCreateTabItem("NewTab2") #EndRegion GUICtrlCreateTabItem("") GUISetState(@SW_SHOW, $hGUI) While 1 $hMsg = GUIGetMsg() Select Case $hMsg = $GUI_EVENT_CLOSE GUIDelete($hGUI) Exit EndSelect WEnd EndFunc Any suggestions on how to resolve would be Appreciated! Edited February 1, 2018 by rcmaehl My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF Link to comment Share on other sites More sharing options...
rcmaehl Posted February 1, 2018 Author Share Posted February 1, 2018 Quote A GUI can only hold a single tab control, but it is possible to create child GUIs each holding a tab control. Oops. Thanks helpfile My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF Link to comment Share on other sites More sharing options...
rcmaehl Posted February 1, 2018 Author Share Posted February 1, 2018 And ChildGUI's break everything... expandcollapse popup#include <Constants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Main() Func Main() Local $hGUI = GUICreate("TestGUI", 640, 480, -1, -1, BitXOR($GUI_SS_DEFAULT_GUI, $WS_MINIMIZEBOX)) GUICreate("", 0, 0, 280, 300, $WS_POPUP, $WS_EX_MDICHILD, $hGUI) GUICtrlCreateTab(0, 0, 280, 300, 0) #Region GUICtrlCreateTabItem("Tab1") #EndRegion #Region GUICtrlCreateTabItem("Tab2") #EndRegion #Region GUICtrlCreateTabItem("Tab3") #EndRegion #Region #cs GUICtrlCreateTabItem("Tab4") #ce #EndRegion #Region GUICtrlCreateTabItem("Tab5") #EndRegion #Region GUICtrlCreateTabItem("Tab6") #EndRegion GUICtrlCreateTabItem("") GUISetState() $hQuickTabs = GUICreate("", 280, 0, 360, 300, $WS_POPUP, $WS_EX_MDICHILD, $hGUI) GUICtrlCreateTab(280, 0, 360, 300) #Region GUICtrlCreateTabItem("NewTab1") #EndRegion #Region GUICtrlCreateTabItem("NewTab2") #EndRegion GUICtrlCreateTabItem("") GUISetState() GUISwitch($hGUI) GUISetState(@SW_SHOW, $hGUI) While 1 $hMsg = GUIGetMsg() Select Case $hMsg = $GUI_EVENT_CLOSE GUIDelete($hGUI) Exit EndSelect WEnd EndFunc Can anyone tell me what I'm doing wrong? My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF Link to comment Share on other sites More sharing options...
Zedna Posted February 2, 2018 Share Posted February 2, 2018 Definitely read the Wiki: https://www.autoitscript.com/wiki/Tabs https://www.autoitscript.com/wiki/Managing_Multiple_GUIs Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
rcmaehl Posted February 2, 2018 Author Share Posted February 2, 2018 (edited) Oops, I forgot that for GUI Creation it's Height, Width, X, Y compared to making a control which is X, Y, Height Width So, of course, a GUI with 0 height or 0 width isn't going to show up.... Edited February 2, 2018 by rcmaehl My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF 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