OnEditObject(Sender: Object; Args: IModelBoxEditObjectEventArgs);
Sender. Parameter that returns the component that has generated the event.
Args. Parameter that returns the model that is being edited.
The OnEditObject event occurs on opening a model for edit.
Executing the example requires a form with two ModelBox components and two UiModel components. The component named UiModel1 is a data source for the component named ModelBox1, and UiModel2 is a data source for ModelBox2. UiModel1 provides access to the model that is the system of non-linear equations.
The example is a handler of the OnEditObject event for the ModelBox1 component and is executed on pressing the Edit button or double-clicking on the equation on the Parameters panel of this component.
Sub ModelBox1OnEditObject(Sender: Object; Args: IModelBoxEditObjectEventArgs);
Begin
UiModel2.Object := Args.Object;
UiModel2.Active := True;
End Sub ModelBox1OnEditObject;
After executing the example the edited model is opened in the ModelBox2 component.
See also: