ControlEvents.Item property

Office 2013 and later

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)

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

value = instance(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.

Important noteImportant

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.