IWxView.AutoScroll

Fore Syntax

AutoScroll;

Fore.NET Syntax

AutoScroll();

Description

The AutoScroll method centers the image of the workspace without zoom changes.

Fore Example

Executing the example requires the object of the workspace type. Create a form, add the Button1 button to it, the WorkspaceBox component named WorkspaceBox1,nbsp;the UiWorkspaceObject component named UiWorkspaceObject1, define the workspace as an object of the UiWorkspaceObject1 component, the UiWorkspaceObject1 component as the source of the WorkspaceBox1 component, and set the True value for the Active property of the UiWorkspaceObject1 component. Add links to the Collections, Metabase and Workspace system assemblies.

Class TestForm: Form
    UiWorkspaceObject1: UiWorkspaceObject;
    WorkspaceBox1: WorkspaceBox;
    Button1: Button;

    Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    Begin
        WorkspaceBox1.View.AutoScroll;
    End Sub Button1OnClick;

End Class TestForm;

By clicking the Button1 button the image is centered in the WorkspaceBox1 component area.

Fore.NET Example

Executing the example requires the object of the workspace type. Create a form, add the Button1 button to it, the WorkspaceBoxNet component named WorkspaceBoxNet1, nbsp;the UiWorkspaceObjectNet component named UiWorkspaceObjectNet1, define the workspace as an object of the UiWorkspaceObjectNet1 component, the UiWorkspaceObjectNet1 component as the source of the WorkspaceBoxNet1 component, and set the True value for the Active property of the UiWorkspaceObjectNet1 component. Add links to the Collections, Metabase and Workspace system assemblies.

Imports Prognoz.Platform.Forms.Net;
Imports Prognoz.Platform.Interop.Andy;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Workspace;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Begin
    WorkspaceBoxNet1.View.AutoScroll();
End Sub;

By clicking the Button1 button the image is centered in the WorkspaceBoxNet1 component area.

See also:

IWxView