IModelBox.IsDirty

Syntax

IsDirty: Boolean;

Description

The IsDirty property returns whether the model displayed by the component is changed.

Comments

Available values:

Example

Executing the example requires that the repository contains a form with the following:

Add links to the Ms and Ui system assemblies.

The example is a handler of the OnClick event for the Button1 button.

Sub Button1OnClick(Sender: Object;  Args: IMouseEventArgs);
Var
    yes: Boolean;
Begin
    If ModelBox1.IsDirty Then
        WinApplication.YesNoCancelBox("The model has changed. Do you want to save changes?", yes);
        If yes Then
            ModelBox1.SaveObject;
        End If;
        Else
            WinApplication.InformationBox("Model is not changed");
    End If;
End Sub Button1OnClick;

After executing the example, if the displayed model is changed, it is prompted to save changes.

See also:

IModelBox