DlgName Function

Syntax

DlgName[$](DlgItem)

Group

Dialog Function

Description

Return the field name of the DlgItem number. This instruction/function must be called directly or indirectly from a dialogfunc.

Parameters

Parameters Description
DlgItem This numeric value is the dialog item number. The first item is 0, second is 1, etc.

Sub Main
    Begin Dialog UserDialog 200,120,.DialogFunc
        Text 10,10,180,15,"Please push the OK button"
        TextBox 10,40,180,15,.Text
        OKButton 30,90,60,20
    End Dialog
    Dim dlg As UserDialog
    Dialog dlg
End SubFunction DialogFunc(DlgItem$, Action%, SuppValue?) As Boolean
    Debug.Print "Action="; Action%
    Select Case Action%
    Case 1 ' Dialog box initialization
        BeepFor I = 0 To DlgCount()-1
            Debug.Print I; DlgName(I)
        Next I
    End Select
End Function