SetBackgroundImage(Rect: Prognoz.Platform.Interop.Drawing.GxRect; BackgroundBitmap: Prognoz.Platform.Interop.Drawing.GxBitmap);
Rect. Rectangle that defines the part of the image to be set as the background.
BackgroundBitmap. The image to be set as the background.
The SetBackgroundImage method sets the specified part of the image as the background for the workspace.
Use the IWxView.AutoScroll method to put an image to the center of the workspace without changing zoom.
Executing the example requires a form with the Button1 button, the WorkspaceBox component with the WorkspaceBox1 identifier and the UiWorkspaceOblect component with the UiWorkspaceOblect1 identifier. Set UiWorkspaceOblect1 as a data source for the WorkspaceBox1 component. The example is the OnClick event handler for the Button1 component. It is also required to have the ConnectedCPs.gif image.
Add links to the Andy, Drawing system assemblies.
On clicking the button the selected image is set as the background for the workspace. Size of the image part, which is set as the background, corresponds to client-based size of the WorkspaceBox1 component.
See also: