IWxWorkspace.Modified

Syntax

Modified: Boolean;

Description

The Modified property returns True if there are any changes made in a workspace.

Example

Executing the example requires a form with the Button1 button, the WorkspaceBox component and the UiWorkspace component named UiWorkspace1, which is a data source for WorkspaceBox.

Add links to the Andy, Drawing, Ui system assemblies.


Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    wsp: IWxWorkspace;
    Arrow: IWxArrow;
    b, b1: Boolean;
Begin
    wsp := UiWorkspace1.WxWorkspace;
    Arrow := wsp.CreateArrow;
    Arrow.FirstPoint := New GxPointF.Create(12);
    Arrow.LastPoint := New GxPointF.Create(319);
    Arrow.Angle := 10;
    If wsp.Modified Then
    b := WinApplication.YesNoCancelBox("Save changed data?", b1);
        If b1 Then
        Else
            wsp.Undo(wsp.UndoNumSteps);
        End If;
    End If;
End Sub Button1OnClick;

After executing the example and in case there are any changes made in a workspace, the user is prompted to save them.

See also:

IWxWorkspace