Assigning Component Methods to Control Events

From Apache OpenOffice Wiki
Jump to: navigation, search



How a dialog is generally designed in the Basic IDE Dialog editor is described in First Steps with OpenOffice.org Basic. The assignment of macros to control events is also described there in the sub chapter Adding Event Handlers , but the Assign Action dialog showed in the following illustration can also be used to bind component methods to control events.

Assign Action dialog

Instead of pressing the Macro... button the Component... button has to be used. It opens a Assign Component dialog.

Assign Component dialog

Besides the standard buttons this dialog only contains an edit field to enter the name of the Component's method the event should be bound to. Unlike in the case of assigning macros it's not possible to browse to a component's methods because at design time no component instance exists. So the name has to be entered by hand.

The next illustration shows how the new assignment is shown in the Assign Action dialog.

Assign Action dialog with assigned component method


Template:Documentation/Tip

The implementation of methods that should be assigned to events is explained in the following chapter.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools