Wobi Posted March 3, 2020 Posted March 3, 2020 Hey there I was trying to create a GUI with Tabs, and in a Tab is a IP Address Input Box. The problem is the IP Address Input Box shows in all Tabs and doesn't hide when switching to an other Tab. For now I can hide/show it with additional script, but maybe someone knows how it work properly or knows the reason why it doesn't hide when switching to an other Tab. I'm not a programmer but interested in it and trying to understand what and why something doesn't work. Here the Test-Code I played a bit with. expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GuiIPAddress.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### $Form1_1 = GUICreate("Tabbed Notebook Dialog", 386, 189, 290, 187) $PageControl1 = GUICtrlCreateTab(0, 0, 372, 176) $TabSheet1 = GUICtrlCreateTabItem("1InputInGroup") $Group1 = GUICtrlCreateGroup("Group1", 8, 24, 145, 73) GUICtrlSetFont(-1, 8, 400, 0, "Arial") $IPAddress1 = _GUICtrlIpAddress_Create($Form1_1, 16, 40, 130, 45, BitOR($WS_GROUP,$WS_TABSTOP,$WS_VISIBLE,$WS_CHILD), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE)) _GUICtrlIpAddress_Set($IPAddress1, "0.0.0.0") GUICtrlCreateGroup("", -99, -99, 1, 1) $TabSheet2 = GUICtrlCreateTabItem("2Input") $IPAddress2 = _GUICtrlIpAddress_Create($Form1_1, 16, 88, 130, 21) _GUICtrlIpAddress_Set($IPAddress2, "0.0.0.0") $IPAddress3 = _GUICtrlIpAddress_Create($Form1_1, 32, 120, 87, 20, BitOR($WS_GROUP,$WS_TABSTOP,$WS_VISIBLE,$WS_CHILD,$WS_BORDER,$WS_CLIPSIBLINGS)) _GUICtrlIpAddress_Set($IPAddress3, "0.0.0.0") $IPAddress4 = _GUICtrlIpAddress_Create($Form1_1, 176, 120, 85, 18) _GUICtrlIpAddress_Set($IPAddress4, "0.0.0.0") $TabSheet3 = GUICtrlCreateTabItem("NormalInput") $Input1 = GUICtrlCreateInput("Input1", 280, 40, 49, 22) GUICtrlSetFont(-1, 8, 400, 0, "Arial") $Button1 = GUICtrlCreateButton("Button1", 272, 72, 75, 25) GUICtrlSetFont(-1, 8, 400, 0, "Arial") GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $PageControl1 ConsoleWrite(GUICtrlRead($PageControl1)) If GUICtrlRead($PageControl1) = 0 Then _GUICtrlIpAddress_ShowHide($IPAddress2, @SW_SHOW) Else _GUICtrlIpAddress_ShowHide($IPAddress2, @SW_HIDE) EndIf EndSwitch WEnd Thanks Wobi
water Posted March 3, 2020 Posted March 3, 2020 (edited) Maybe your problem and a solution is described here: A good explanation what happens can be found here: As always: The help file is your friend Edited March 3, 2020 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
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