IWxWorkspace.Redo

Syntax

Redo([Steps: Integer = 1]);

Parameters

Steps. Number of steps. The parameter is equal to 1 by default.

Description

The Redo method repeats the defined number of canceled actions. If the parameter has not been defined, the method repeats the last canceled action.

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;
    wsp.Undo(wsp.UndoNumSteps);
    
If wsp.Modified Then
    b := WinApplication.YesNoCancelBox(
"Save changed data?", b1);
        
If b1 Then
        
Else
            wsp.Redo(wsp.RedoNumSteps);
        
End If;
    
End If;
End Sub Button1OnClick;

After executing the example all available actions are repeated.

See also:

IWxWorkspace | WxWorkspace.UndoEnabled