Sign in to follow this  
Followers 0
5t0n3r

Adding show / hide radio buttons to tabs

3 posts in this topic

I am having issues getting the code for showing / hiding information to appear on tabs.

I can get both codes working seperately, but together it doesn't work.

I need to be able to have different options on each tab, collecting information and then writing it to a file or e-mailing it.

Any help getting it to work together would be appreciated.

Code #1 (Show / Hide)

#include <GUIConstants.au3>

GUICreate("Test Radio Buttons",400,430,-1,-1)

Dim $new1Input1, $new1Input2

GUICtrlCreateLabel ("Selection?",10,10,350,20)
GUICtrlSetFont (-1,10)
GUICtrlCreateGroup ("", 10, 30, 140, 60)
$new1Radio1 = GUICtrlCreateRadio ("YES", 30, 50, 50, 20)
$new1Radio2 = GUICtrlCreateRadio ("NO", 80, 50, 50, 20)
$new1Label1 = GUICtrlCreateLabel ("label 1",  10,110,350,20)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetFont (-1,10)
$new1Input1 = GUICtrlCreateInput ( "label 1", 30, 140, 200, 20 )
GUICtrlSetState(-1, $GUI_HIDE)
$new1Label2 = GUICtrlCreateLabel ("label 2",  10,110,350,40)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetFont (-1,10)
$new1Input2 = GUICtrlCreateInput ("label 2", 30, 140, 200, 20 )
GUICtrlSetState(-1, $GUI_HIDE)

GUISetState()

While 1
    $page1Msg1 = GUIGetMsg()
    If $page1Msg1 = $new1Radio1 Then
        GUICTRLSetState($new1Label1, $GUI_SHOW)
        GUIctrlSetState($new1Input1, $GUI_SHOW)
        GUIctrlSetState($new1Label2, $GUI_HIDE)
        GUIctrlSetState($new1Input2, $GUI_HIDE)
    EndIf
    If $page1Msg1 = $new1Radio2 Then
        GUIctrlSetState($new1Label1, $GUI_HIDE)
        GUIctrlSetState($new1Input1, $GUI_HIDE)
        GUIctrlSetState($new1Label2, $GUI_SHOW)
        GUIctrlSetState($new1Input2, $GUI_SHOW)
        EndIf
    If $page1Msg1 = $GUI_EVENT_CLOSE Then ExitLoop
Wend

Code #2 (Tabbed Menu)

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=ICO\COOP.ico
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

Opt("TrayMenuMode",1)
TraySetIcon("ICO\COOP.ico")
TraySetToolTip("Add / Remove Employee")
TraySetState()

$gui = GUICreate("Add / Remove Employee Process", 650, 700)
$tab = GUICtrlCreateTab(-10, -22, 665, 725)

; Main Menu Page
$main1Page1 = GUICtrlCreateTabItem("mainmenu1")
$main1Btn1 = GUICtrlCreateButton("New Employee", 125, 100, 150, 60)
$main1Btn2 = GUICtrlCreateButton("Terminated Employee", 350, 100, 150, 60)
GUICtrlCreateLabel("Choose this option for the" & @CRLF & "New Employee checklist.", 130, 200)
GUICtrlCreateLabel("Choose this option for the" & @CRLF & "Terminated Employee checklist.", 355, 200)
; End Main Menu page

; New Employee Page 1
$new1Page1 = GUICtrlCreateTabItem("new_employee_p1")
$newGroup1 = GUICtrlCreateGroup("New Employee - [1/7]", 8, 10, 635, 645)
$new1Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$new1Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("1)  Has the user been added to Active Directory?", 30, 50)
$new1Radio1 = GUICtrlCreateRadio("Yes", 50, 70, 120, 20)
$new1Radio2 = GUICtrlCreateRadio("No", 50, 90, 120, 20)
; End New Employee Page 1

; New Employee Page 2
$new2Page1 = GUICtrlCreateTabItem("new_employee_p2")
$newGroup1 = GUICtrlCreateGroup("New Employee - [2/7]", 8, 10, 635, 645)
$new2Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$new2Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("New Employee Page 2", 100, 200)
; End New Employee Page 2

; New Employee Page 3
$new3Page1 = GUICtrlCreateTabItem("new_employee_p3")
$newGroup1 = GUICtrlCreateGroup("New Employee - [3/7]", 8, 10, 635, 645)
$new3Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$new3Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("New Employee Page 3", 100, 200)
; End New Employee Page 3

; New Employee Page 4
$new4Page1 = GUICtrlCreateTabItem("new_employee_p4")
$newGroup1 = GUICtrlCreateGroup("New Employee - [4/7]", 8, 10, 635, 645)
$new4Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$new4Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("New Employee Page 4", 100, 200)
; End New Employee Page 4

; New Employee Page 5
$new5Page1 = GUICtrlCreateTabItem("new_employee_p5")
$newGroup1 = GUICtrlCreateGroup("New Employee - [5/7]", 8, 10, 635, 645)
$new5Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$new5Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("New Employee Page 5", 100, 200)
; End New Employee Page 5

; New Employee Page 6
$new6Page1 = GUICtrlCreateTabItem("new_employee_p6")
$newGroup1 = GUICtrlCreateGroup("New Employee - [6/7]", 8, 10, 635, 645)
$new6Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$new6Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("New Employee Page 6", 100, 200)
; End New Employee Page 6

; New Employee Page 7
$new7Page1 = GUICtrlCreateTabItem("new_employee_p7")
$newGroup1 = GUICtrlCreateGroup("New Employee - [7/7]", 8, 10, 635, 645)
$new7Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$new7Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
$new7Finish1 = GUICtrlCreateButton("Finish", 260, 195, 75, 25)
GUICtrlCreateLabel("New Employee Page 7", 100, 200)
; End New Employee Page 7

;==================================================================

; Terminated Employee Page 1
$ter1Page1 = GUICtrlCreateTabItem("ter_employee_page1")
$terGroup2 = GUICtrlCreateGroup("Terminated Employee - [1/7]", 8, 10, 635, 645)
$ter1Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$ter1Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("Terminated Employee Page 1", 100, 200)
; End Terminated Employee Page 1

; Terminated Employee Page 2
$ter2Page1 = GUICtrlCreateTabItem("ter_employee_page2")
$terGroup2 = GUICtrlCreateGroup("Terminated Employee - [2/7]", 8, 10, 635, 645)
$ter2Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$ter2Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("Terminated Employee Page 2", 100, 200)
; End Terminated Employee Page 2

; Terminated Employee Page 3
$ter3Page1 = GUICtrlCreateTabItem("ter_employee_page3")
$terGroup2 = GUICtrlCreateGroup("Terminated Employee - [3/7]", 8, 10, 635, 645)
$ter3Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$ter3Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("Terminated Employee Page 3", 100, 200)
; End Terminated Employee Page 3

; Terminated Employee Page 4
$ter4Page1 = GUICtrlCreateTabItem("ter_employee_page4")
$terGroup2 = GUICtrlCreateGroup("Terminated Employee - [4/7]", 8, 10, 635, 645)
$ter4Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$ter4Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("Terminated Employee Page 4", 100, 200)
; End Terminated Employee Page 4

; Terminated Employee Page 5
$ter5Page1 = GUICtrlCreateTabItem("ter_employee_page5")
$terGroup2 = GUICtrlCreateGroup("Terminated Employee - [5/7]", 8, 10, 635, 645)
$ter5Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$ter5Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("Terminated Employee Page 5", 100, 200)
; End Terminated Employee Page 5

; Terminated Employee Page 6
$ter6Page1 = GUICtrlCreateTabItem("ter_employee_page6")
$terGroup2 = GUICtrlCreateGroup("Terminated Employee - [6/7]", 8, 10, 635, 645)
$ter6Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$ter6Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("Terminated Employee Page 6", 100, 200)
; End Terminated Employee Page 6

; Terminated Employee Page 7
$ter7Page1 = GUICtrlCreateTabItem("ter_employee_page7")
$terGroup2 = GUICtrlCreateGroup("Terminated Employee - [7/7]", 8, 10, 635, 645)
$ter7Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$ter7Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
$ter7Finish1 = GUICtrlCreateButton("Finish", 260, 195, 75, 25)
GUICtrlCreateLabel("Terminated Employee Page 7", 100, 200)
; End Terminated Employee Page 7

;==================================================================

GUICtrlCreateTabitem ("")
$cancel = GUICtrlCreateButton("Cancel", 560, 660, 75, 25)
GUICtrlSetState($main1Page1, $GUI_SHOW)
GUICtrlSetState($new7Next1, $GUI_DISABLE)
GUICtrlSetState($ter7Next1, $GUI_DISABLE)
GUISetState()

While 1
    $Msg = GUIGetMsg()
    Switch $Msg
        Case - 3
            $answer = MsgBox(32 + 4, "Exit Program", "Are you sure you want to EXIT the program?" & @CRLF & "Any unsaved information will be lost.")
            Switch $answer
                Case 6; Yes
                    Exit
                Case 7; No
            EndSwitch
        Case $cancel
            $answer = MsgBox(32 + 4, "Exit Program", "Are you sure you want to EXIT the program?" & @CRLF & "Any unsaved information will be lost.")
            Switch $answer
                Case 6; Yes
                    Exit
                Case 7; No
            EndSwitch

;==================================================================

        Case $main1Btn1
            GUICtrlSetState($new1Page1, $GUI_SHOW)
        Case $main1Btn2
            GUICtrlSetState($ter1Page1, $GUI_SHOW)


        Case $new1Back1
            GUICtrlSetState($main1Page1, $GUI_SHOW)
        Case $new1Next1
            GUICtrlSetState($new2Page1, $GUI_SHOW)
        Case $new2Back1
            GUICtrlSetState($new1Page1, $GUI_SHOW)
        Case $new2Next1
            GUICtrlSetState($new3Page1, $GUI_SHOW)
        Case $new3Back1
            GUICtrlSetState($new2Page1, $GUI_SHOW)
        Case $new3Next1
            GUICtrlSetState($new4Page1, $GUI_SHOW)
        Case $new4Back1
            GUICtrlSetState($new3Page1, $GUI_SHOW)
        Case $new4Next1
            GUICtrlSetState($new5Page1, $GUI_SHOW)
        Case $new5Back1
            GUICtrlSetState($new4Page1, $GUI_SHOW)
        Case $new5Next1
            GUICtrlSetState($new6Page1, $GUI_SHOW)
        Case $new6Back1
            GUICtrlSetState($new5Page1, $GUI_SHOW)
        Case $new6Next1
            GUICtrlSetState($new7Page1, $GUI_SHOW)
        Case $new7Back1
            GUICtrlSetState($new6Page1, $GUI_SHOW)
        Case $new7Finish1
            GUICtrlSetState($main1Page1, $GUI_SHOW)


        Case $ter1Back1
            GUICtrlSetState($main1Page1, $GUI_SHOW)
        Case $ter1Next1
            GUICtrlSetState($ter2Page1, $GUI_SHOW)
        Case $ter2Back1
            GUICtrlSetState($ter1Page1, $GUI_SHOW)
        Case $ter2Next1
            GUICtrlSetState($ter3Page1, $GUI_SHOW)
        Case $ter3Back1
            GUICtrlSetState($ter2Page1, $GUI_SHOW)
        Case $ter3Next1
            GUICtrlSetState($ter4Page1, $GUI_SHOW)
        Case $ter4Back1
            GUICtrlSetState($ter3Page1, $GUI_SHOW)
        Case $ter4Next1
            GUICtrlSetState($ter5Page1, $GUI_SHOW)
        Case $ter5Back1
            GUICtrlSetState($ter4Page1, $GUI_SHOW)
        Case $ter5Next1
            GUICtrlSetState($ter6Page1, $GUI_SHOW)
        Case $ter6Back1
            GUICtrlSetState($ter5Page1, $GUI_SHOW)
        Case $ter6Next1
            GUICtrlSetState($ter7Page1, $GUI_SHOW)
        Case $ter7Back1
            GUICtrlSetState($ter6Page1, $GUI_SHOW)
        Case $ter7Finish1
            GUICtrlSetState($main1Page1, $GUI_SHOW)

    EndSwitch
WEnd

Share this post


Link to post
Share on other sites



try this:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=ICO\COOP.ico
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

Opt("TrayMenuMode",1)
TraySetIcon("ICO\COOP.ico")
TraySetToolTip("Add / Remove Employee")
TraySetState()

$gui = GUICreate("Add / Remove Employee Process", 650, 700)
$tab = GUICtrlCreateTab(-10, -22, 665, 725)

; Main Menu Page
$main1Page1 = GUICtrlCreateTabItem("mainmenu1")
$main1Btn1 = GUICtrlCreateButton("New Employee", 125, 100, 150, 60)
$main1Btn2 = GUICtrlCreateButton("Terminated Employee", 350, 100, 150, 60)
GUICtrlCreateLabel("Choose this option for the" & @CRLF & "New Employee checklist.", 130, 200)
GUICtrlCreateLabel("Choose this option for the" & @CRLF & "Terminated Employee checklist.", 355, 200)
; End Main Menu page

; New Employee Page 1
$new1Page1 = GUICtrlCreateTabItem("new_employee_p1")
$newGroup1 = GUICtrlCreateGroup("New Employee - [1/7]", 8, 10, 635, 645)
$new1Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$new1Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("1)  Has the user been added to Active Directory?", 30, 50)
$new1Radio1 = GUICtrlCreateRadio("Yes", 50, 70, 120, 20)
$new1Radio2 = GUICtrlCreateRadio("No", 50, 90, 120, 20)
$new1Label1 = GUICtrlCreateLabel ("label 1",  10,110,350,20)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetFont (-1,10)
$new1Input1 = GUICtrlCreateInput ( "label 1", 30, 140, 200, 20 )
GUICtrlSetState(-1, $GUI_HIDE)
$new1Label2 = GUICtrlCreateLabel ("label 2",  10,110,350,40)
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlSetFont (-1,10)
$new1Input2 = GUICtrlCreateInput ("label 2", 30, 140, 200, 20 )
GUICtrlSetState(-1, $GUI_HIDE)


; End New Employee Page 1

; New Employee Page 2
$new2Page1 = GUICtrlCreateTabItem("new_employee_p2")
$newGroup1 = GUICtrlCreateGroup("New Employee - [2/7]", 8, 10, 635, 645)
$new2Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$new2Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("New Employee Page 2", 100, 200)
; End New Employee Page 2

; New Employee Page 3
$new3Page1 = GUICtrlCreateTabItem("new_employee_p3")
$newGroup1 = GUICtrlCreateGroup("New Employee - [3/7]", 8, 10, 635, 645)
$new3Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$new3Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("New Employee Page 3", 100, 200)
; End New Employee Page 3

; New Employee Page 4
$new4Page1 = GUICtrlCreateTabItem("new_employee_p4")
$newGroup1 = GUICtrlCreateGroup("New Employee - [4/7]", 8, 10, 635, 645)
$new4Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$new4Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("New Employee Page 4", 100, 200)
; End New Employee Page 4

; New Employee Page 5
$new5Page1 = GUICtrlCreateTabItem("new_employee_p5")
$newGroup1 = GUICtrlCreateGroup("New Employee - [5/7]", 8, 10, 635, 645)
$new5Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$new5Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("New Employee Page 5", 100, 200)
; End New Employee Page 5

; New Employee Page 6
$new6Page1 = GUICtrlCreateTabItem("new_employee_p6")
$newGroup1 = GUICtrlCreateGroup("New Employee - [6/7]", 8, 10, 635, 645)
$new6Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$new6Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("New Employee Page 6", 100, 200)
; End New Employee Page 6

; New Employee Page 7
$new7Page1 = GUICtrlCreateTabItem("new_employee_p7")
$newGroup1 = GUICtrlCreateGroup("New Employee - [7/7]", 8, 10, 635, 645)
$new7Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$new7Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
$new7Finish1 = GUICtrlCreateButton("Finish", 260, 195, 75, 25)
GUICtrlCreateLabel("New Employee Page 7", 100, 200)
; End New Employee Page 7

;==================================================================

; Terminated Employee Page 1
$ter1Page1 = GUICtrlCreateTabItem("ter_employee_page1")
$terGroup2 = GUICtrlCreateGroup("Terminated Employee - [1/7]", 8, 10, 635, 645)
$ter1Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$ter1Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("Terminated Employee Page 1", 100, 200)
; End Terminated Employee Page 1

; Terminated Employee Page 2
$ter2Page1 = GUICtrlCreateTabItem("ter_employee_page2")
$terGroup2 = GUICtrlCreateGroup("Terminated Employee - [2/7]", 8, 10, 635, 645)
$ter2Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$ter2Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("Terminated Employee Page 2", 100, 200)
; End Terminated Employee Page 2

; Terminated Employee Page 3
$ter3Page1 = GUICtrlCreateTabItem("ter_employee_page3")
$terGroup2 = GUICtrlCreateGroup("Terminated Employee - [3/7]", 8, 10, 635, 645)
$ter3Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$ter3Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("Terminated Employee Page 3", 100, 200)
; End Terminated Employee Page 3

; Terminated Employee Page 4
$ter4Page1 = GUICtrlCreateTabItem("ter_employee_page4")
$terGroup2 = GUICtrlCreateGroup("Terminated Employee - [4/7]", 8, 10, 635, 645)
$ter4Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$ter4Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("Terminated Employee Page 4", 100, 200)
; End Terminated Employee Page 4

; Terminated Employee Page 5
$ter5Page1 = GUICtrlCreateTabItem("ter_employee_page5")
$terGroup2 = GUICtrlCreateGroup("Terminated Employee - [5/7]", 8, 10, 635, 645)
$ter5Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$ter5Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("Terminated Employee Page 5", 100, 200)
; End Terminated Employee Page 5

; Terminated Employee Page 6
$ter6Page1 = GUICtrlCreateTabItem("ter_employee_page6")
$terGroup2 = GUICtrlCreateGroup("Terminated Employee - [6/7]", 8, 10, 635, 645)
$ter6Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$ter6Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
GUICtrlCreateLabel("Terminated Employee Page 6", 100, 200)
; End Terminated Employee Page 6

; Terminated Employee Page 7
$ter7Page1 = GUICtrlCreateTabItem("ter_employee_page7")
$terGroup2 = GUICtrlCreateGroup("Terminated Employee - [7/7]", 8, 10, 635, 645)
$ter7Back1 = GUICtrlCreateButton("< Back", 400, 660, 75, 25)
$ter7Next1 = GUICtrlCreateButton("Next >", 475, 660, 75, 25)
$ter7Finish1 = GUICtrlCreateButton("Finish", 260, 195, 75, 25)
GUICtrlCreateLabel("Terminated Employee Page 7", 100, 200)
; End Terminated Employee Page 7

;==================================================================

GUICtrlCreateTabitem ("")
$cancel = GUICtrlCreateButton("Cancel", 560, 660, 75, 25)
GUICtrlSetState($main1Page1, $GUI_SHOW)
GUICtrlSetState($new7Next1, $GUI_DISABLE)
GUICtrlSetState($ter7Next1, $GUI_DISABLE)
GUISetState()

While 1
    $Msg = GUIGetMsg()
    Switch $Msg
         case $new1Radio1
        GUICTRLSetState($new1Label1, $GUI_SHOW)
        GUIctrlSetState($new1Input1, $GUI_SHOW)
        GUIctrlSetState($new1Label2, $GUI_HIDE)
        GUIctrlSetState($new1Input2, $GUI_HIDE)
case $new1Radio2
 GUIctrlSetState($new1Label1, $GUI_HIDE)
        GUIctrlSetState($new1Input1, $GUI_HIDE)
        GUIctrlSetState($new1Label2, $GUI_SHOW)
        GUIctrlSetState($new1Input2, $GUI_SHOW)

        Case - 3
            $answer = MsgBox(32 + 4, "Exit Program", "Are you sure you want to EXIT the program?" & @CRLF & "Any unsaved information will be lost.")
            Switch $answer
                Case 6; Yes
                    Exit
                Case 7; No
            EndSwitch
        Case $cancel
            $answer = MsgBox(32 + 4, "Exit Program", "Are you sure you want to EXIT the program?" & @CRLF & "Any unsaved information will be lost.")
            Switch $answer
                Case 6; Yes
                    Exit
                Case 7; No
            EndSwitch

;==================================================================

        Case $main1Btn1
            GUICtrlSetState($new1Page1, $GUI_SHOW)
        Case $main1Btn2
            GUICtrlSetState($ter1Page1, $GUI_SHOW)


        Case $new1Back1
            GUICtrlSetState($main1Page1, $GUI_SHOW)
        Case $new1Next1
            GUICtrlSetState($new2Page1, $GUI_SHOW)
        Case $new2Back1
            GUICtrlSetState($new1Page1, $GUI_SHOW)
        Case $new2Next1
            GUICtrlSetState($new3Page1, $GUI_SHOW)
        Case $new3Back1
            GUICtrlSetState($new2Page1, $GUI_SHOW)
        Case $new3Next1
            GUICtrlSetState($new4Page1, $GUI_SHOW)
        Case $new4Back1
            GUICtrlSetState($new3Page1, $GUI_SHOW)
        Case $new4Next1
            GUICtrlSetState($new5Page1, $GUI_SHOW)
        Case $new5Back1
            GUICtrlSetState($new4Page1, $GUI_SHOW)
        Case $new5Next1
            GUICtrlSetState($new6Page1, $GUI_SHOW)
        Case $new6Back1
            GUICtrlSetState($new5Page1, $GUI_SHOW)
        Case $new6Next1
            GUICtrlSetState($new7Page1, $GUI_SHOW)
        Case $new7Back1
            GUICtrlSetState($new6Page1, $GUI_SHOW)
        Case $new7Finish1
            GUICtrlSetState($main1Page1, $GUI_SHOW)


        Case $ter1Back1
            GUICtrlSetState($main1Page1, $GUI_SHOW)
        Case $ter1Next1
            GUICtrlSetState($ter2Page1, $GUI_SHOW)
        Case $ter2Back1
            GUICtrlSetState($ter1Page1, $GUI_SHOW)
        Case $ter2Next1
            GUICtrlSetState($ter3Page1, $GUI_SHOW)
        Case $ter3Back1
            GUICtrlSetState($ter2Page1, $GUI_SHOW)
        Case $ter3Next1
            GUICtrlSetState($ter4Page1, $GUI_SHOW)
        Case $ter4Back1
            GUICtrlSetState($ter3Page1, $GUI_SHOW)
        Case $ter4Next1
            GUICtrlSetState($ter5Page1, $GUI_SHOW)
        Case $ter5Back1
            GUICtrlSetState($ter4Page1, $GUI_SHOW)
        Case $ter5Next1
            GUICtrlSetState($ter6Page1, $GUI_SHOW)
        Case $ter6Back1
            GUICtrlSetState($ter5Page1, $GUI_SHOW)
        Case $ter6Next1
            GUICtrlSetState($ter7Page1, $GUI_SHOW)
        Case $ter7Back1
            GUICtrlSetState($ter6Page1, $GUI_SHOW)
        Case $ter7Finish1
            GUICtrlSetState($main1Page1, $GUI_SHOW)

    EndSwitch
WEnd

Share this post


Link to post
Share on other sites

That's perfect! Thanks andygo! :D

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0