Current Help System: PC-DMIS BASIC (View Core Help)

#### Example:

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

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

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%

Case 1

DlgEnable "Group", 0

DlgVisible "Chk2", 0

DlgVisible "History", 0

Case 2

If ControlID$ = "Chk1" Then

DlgEnable "Group", On

DlgVisible "Chk2"

DlgVisible "History"

End If

If ControlID$ = "Chk2" Then

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

End If

If ControlID$ = "History" Then

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