Partager via


ControlEvents.Item Property

Gets the Clicked event associated with a Button control from the ControlEvents collection.

Namespace:  Microsoft.Office.InfoPath
Assembly:  Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)

Syntax

'Declaration
Public MustOverride ReadOnly Default Property Item ( _
    controlId As String _
) As Object
    Get
'Usage
Dim instance As ControlEvents
Dim controlId As String
Dim value As Object

value = instance(controlId)
public abstract Object this[
    string controlId
] { get; }

Parameters

  • controlId
    Type: System.String

    The ID of the Button control associated with the Clicked event.

Property Value

Type: System.Object
The Clicked event associated with the specified Button control.

Remarks

Important

The code to bind event handlers using the ControlEvents class is not meant to be written by the developer in form code. When you add an event handler for a Button control to your form template from the design mode user interface, InfoPath generates code in the InternalStartup method of your form code file using the EventManager class and the ControlEvents class to bind the Clicked events raised by Button controls to their event handlers. You should not create the InternalStartup method or write any additional code within it yourself. For information about how to add event handlers using interface commands, see How to: Add an Event Handler.

See Also

Reference

ControlEvents Class

ControlEvents Members

Microsoft.Office.InfoPath Namespace