Events page

From RAD Studio
Jump to: navigation, search

Go Up to About the Object Inspector Index


The Events page of the Object Inspector lists all the published events for the selected component, and for the form itself.

To automatically generate the event handler declaration and structure on the code editor file, double-click the right column for the specific event. For example the OnClick event.

The event handler specifies how a component or form responds to a particular event. To know more about event handlers, see Event Handlers.

After double-clicking the right column for the specific event, the focus switches to the Code Editor. Include the code sentences you want your application to execute when the event is triggered, inside the structure definition of the event handler.

See Event Handlers for an example of event handler declaration and structure definition.

Editing an Event Handler

  • Select an existing event handler for a specific event by selecting the event handler from the drop-down menu.
  • Type the name of the event handler to assign, on the Value column of the event. If the name does not correspond to an existing event handler, the event handler is automatically created or edited with the new name.

Assigning an Event handler to One or More Events

You can create a default event handler for a specific event, or you can assign a specific event handler to an event.

When you select an event from the Events page, the value column displays a drop-down list of existing event handlers that can respond to the event. You can choose one of the existing event handlers.

You can have one event handler that responds to multiple events. Just assign the same event handler to the events using the Events page of the Object Inspector.

Multiple Events.png

See Also