Syntax |
DlgControlId(ControlName$) |
Description |
Returns an Integer containing the index of the specified control as it appears in the dialog box template. |
Comments |
The first control in the dialog box template is at index 0, the second is at index 1, and so on. The ControlName$ parameter contains the name of the .Identifier parameter associated with that control in the dialog box template. |
|
The Basic Control Engine statements and functions that dynamically manipulate dialog box controls identify individual controls using either the .Identifier name of the control or the control's index. Using the index to refer to a control is slightly faster but results in code that is more difficult to maintain. |
Example |
This example uses DlgControlId to verify which control was triggered and branches the dynamic dialog script accordingly. Function DlgProc(ControlName$,Action%,SuppValue%) As Integer If Action% = 2 Then |
|
Sub Main() Begin Dialog UserDialog
,,180,96,"Untitled",.DlgProc |
See Also |
DlgEnable (function); DlgEnable (statement); DlgFocus (function); DlgFocus (statement); DlgListBoxArray (function); DlgListBoxArray (statement); DlgSetPicture (statement); DlgText (statement); DlgText$ (function); DlgValue (function); DlgValue (statement); DlgVisible (statement); DlgVisible (function). |
D |