IUiWorkspace.WxWorkspace

Syntax

WxWorkspace: IWxWorkspace;

Description

The WxWorkspace property returns the workspace graphic context that is further displayed in the WorkspaceBox component.

Example

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

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

Workspace: IWxWorkspace;

Rect: IWxRectangle;

Point: IGxPointF;

Begin

Point := New GxPointF.Create(-15, -15);

WorkspaceBox1.Source := UiWorkspace1 As IWorkspaceSource;

Workspace := UiWorkspace1.WxWorkspace;

Workspace.BeginUpdate;

//1 rectangle

Rect := Workspace.CreateRectangle;

//2 rectangle

Rect := Workspace.CreateRectangle;

Rect.PinPosition := Point;

Workspace.EndUpdate;

End Sub Button1OnClick;

After executing the example, on clicking the button the UiWorkspace1 component is set as a data source for the WorkspaceBox1 component. Two rectangles are created on the workspace of the UiWorkspace1 component. The second rectangle is shifted to the given point.

See also:

IUiWorkspace