JailDoctor Posted August 2, 2011 Share Posted August 2, 2011 It would be very evident to anyone that the two extra lines are leftover from cleaning a much larger script I copied and edited quickly to present a clear description of my question. You can even say the tabs are too wide for the radio buttons; obviously the tabs have more options. The two additional lines have no consequences to even mention them. Thank you for directing me to the examples. The dilemma remains in that the code does not work very well with my code. I entered GUISetState(-1,$GUI_SHOW) after entering GUICtrlCreateTabItem but it does not work. The -1 flag stops the execution of the script. Avoiding the -1 flag, the correct tab is displayed, but the first tab is still highlighted. The options for the first tab no longer appear. GUISetState(-1,$GUI_SHOW) ;Does not work and the script hangs. GUISetState($GUI_SHOW) ; Works but the first tab no longer appears. This is the code with your recommendation. expandcollapse popup#include <GuiTab.au3> #include <GUIConstantsEx.au3> Dim $test $test = InputBox("Lettter Choser", "Please enter A,B,C,E,F,G,X,Y or Z") $myTab = GUICreate("This is my tab test", 740, 480, 20, 100) GUICtrlSetFont(-1, 28, 400, 0, "Niagara Solid") $PageControl1 = GUICtrlCreateTab(8, 8,626, 344) GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) $TabSheet1 = GUICtrlCreateTabItem("One") $Radio1 = GUICtrlCreateRadio("A", 160,150, 40, 20) $Radio2 = GUICtrlCreateRadio("B", 160, 180, 40, 20) $Radio3 = GUICtrlCreateRadio("C", 160, 210, 60, 20) $TabSheet2 = GUICtrlCreateTabItem("Two") $Radio4 = GUICtrlCreateRadio("E", 160,150, 40, 20) $Radio5 = GUICtrlCreateRadio("F", 160, 180, 40, 20) $Radio6 = GUICtrlCreateRadio("G", 160, 210, 60, 20) $TabSheet3 = GUICtrlCreateTabItem("Three") If $test = "X" Then GUISetState(-1,$GUI_SHOW) ;~ GUISetState($GUI_SHOW) EndIf $Radio7 = GUICtrlCreateRadio("X", 160,150, 40, 20) $Radio8 = GUICtrlCreateRadio("Y", 160, 180, 40, 20) $Radio9 = GUICtrlCreateRadio("Z", 160, 210, 60, 20) GUICtrlCreateTabItem("") ;********** GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd Link to comment Share on other sites More sharing options...
monoscout999 Posted August 2, 2011 Share Posted August 2, 2011 you have a mistake with this is GUICtrlSetState() GUISetState is for GUIs no for the controls. Link to comment Share on other sites More sharing options...
JailDoctor Posted August 3, 2011 Share Posted August 3, 2011 you have a mistake with thisis GUICtrlSetState()GUISetState is for GUIs no for the controls.That's the ticket!Thanks monoscout999, that was the typo, it works now. 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