EventsAssembly: IMetabaseObjectDescriptor;
The EventsAssembly property determines description of the development environment object, which will be used to handle information panel events.
The class for handling events is specified in the EventsClass property.
Executing the example requires that the repository contains an information panel with the DASHBOARD identifier. The M_DASH_EVENTS unit with the CUserEvents class should also be present.
Add links to the Dashboard and Metabase system assemblies.
Sub UserProc;
Var
Mb: IMetabase;
Dashboard: IDashboard;
Begin
Mb := MetabaseClass.Active;
// Open information panel for edit
Dashboard := Mb.ItemById("DASHBOARD").Edit As IDashboard;
// Connect event handler
Dashboard.EventsAssembly := Mb.ItemById("M_DASH_EVENTS");
Dashboard.EventsClass := "CUserEvents";
// Save changes
Dashboard.MetabaseObject.Save;
End Sub UserProc;
After executing the example the event handler is set for information panel.
See also: