RAD Studio (Common)
ContentsIndex
PreviousUpNext
Writing Event Handlers

Your source code usually responds to events that might occur to a component at runtime, such as a user clicking a button or choosing a menu command. The code that responds to an occurrence is called an event handler. The event handler code can modify property values and call methods.

To write an event handler

  1. On your form, click the component for which you want to write an event handler.
  2. To create the default event for the component, double-click the component on the form. To choose another event for the component, click the Events tab in the Object Inspector, locate the event, and double-click its text box. The Code Editor appears.
  3. Type the code that will execute when the event occurs at runtime.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!