basic

Example:

1. Function Enable( ControlID$, Action%, SuppValue%)

   1. Begin Dialog UserDialog2 160,160, 260, 188, "3", .Enable

      1. Text 8,10,73,13, "New dialog Label:"

         TextBox 8, 26, 160, 18, .FText

         CheckBox 8, 56, 203, 16, "New CheckBox",. ch1

         CheckBox 18,100,189,16, "Additional CheckBox", .ch2

         PushButton 18, 118, 159, 16, "Push Button", .but1

         OKButton 177, 8, 58, 21

         CancelButton 177, 32, 58, 21

      End Dialog

      Dim Dlg2 As UserDialog2

      Dlg2.FText = "Your default string goes here"

      Select Case Action%

      1. Case 1

         1. DlgEnable "Group", 0

            DlgVisible "Chk2", 0

            DlgVisible "History", 0

         Case 2

         1. If ControlID$ = "Chk1" Then

            1. DlgEnable "Group", On

               DlgVisible "Chk2"

               DlgVisible "History"

            End If

            If ControlID$ = "Chk2" Then

            1. DlgText "History", "Push to display nested dialog"

            End If

            If ControlID$ = "History" Then

            1. Enable =1

               Number = 4

               MsgBox SQR(Number) & " The sqr of 4 is 2"

               x = Dialog( Dlg2 )

            End If

            If ControlID$ = "but1" Then

            End If

         Case Else

      End Select

      Enable =1

   End Function