IUiWorkspaceObject.Workspace

Syntax

Workspace: IWorkspace;

Description

The Workspace property determines the repository workspace, which data will be displayed in the visual component.

Example

Executing the example requires a form with the Button1 button, the WorkspaceBox component named WorkspaceBox1, and the UiWorkspaceObject component that is used as a data source for the WorkspaceBox1 component.

Add links to the Andy, Collections, ExtCtrls, Forms, Ui, and Workspace system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    Var
        MB: IMetabase;
        Wsp: IWorkspace;
    Begin
        MB := MetabaseClass.Active;
        Wsp := MB.ItemById("Wsp_1").Bind As IWorkspace;
        UiWorkspaceObject1.Workspace := Wsp;
        UiWorkspaceObject1.Active := True;
        WorkspaceBox1.Source := UiWorkspaceObject1 As IWorkspaceSource;
End Sub Button1OnClick;

After executing the example, clicking the button links the UiWorkspaceObject1 component with the workspace with the Wsp_1 identifier. Data is displayed in the WorkspaceBox1 component.

See also:

IUiWorkspaceObject