Using the WFC Component Builder, you can easily add and delete event definitions in your WFC-based components. Because an event uses a delegate to invoke its event handler, your component provides public addOn<EventName> and removeOn<EventName> methods to add and remove the delegate. Your component also defines a protected on<EventName> method that triggers the event. For more information about WFC events, see WFC Fundamental Programming Concepts.
When you add an event with the WFC Component Builder, the associated methods and the member variable for the delegate are automatically added to your class. The builder also adds the event information to your component's ClassInfo class. ClassInfo allows information about your component to be publicized in a property browser, such as the Properties window.
Note If your component does not contain a ClassInfo definition, the WFC Component Builder inserts one into your class.
When you delete an event with the WFC Component Builder, the associated ClassInfo entry, delegate, and methods are automatically deleted from your class.
To open the WFC Component Builder
To add an event
To delete an event
Note Deleting an event deletes all associated methods, delegates, and ClassInfo information. Any code that you have added to the methods will be lost. However, you can undo multiple levels of deletion from the Text editor, after the WFC Component Builder is closed. On the Edit menu, click Undo for each deleted item that you want to restore.