IWxStyle.BackgroundBrushBackColor

Syntax

BackgroundBrushBackColor: IGxColor;

BackgroundBrushBackColor: Prognoz.Platform.Interop.Drawing.GxColor;

Description

The BackgroundBrushBackColor property determines pattern color for object background.

Example

Executing the example requires a form with the Button and UiWorkspaceObject components with the Button1 and UiWorkspaceObject1 identifiers, respectively. A corresponding repository object must be connected to UiWorkspaceObject. This component must also contain a previously created shape.

Add links to the Andy, Drawing, Workspace system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    ws: IWxWorkspace;
    Shape: IWxShape;
    Style: IWxStyle;
Begin
    ws := UiWorkspaceObject1.Instance 
As IWxWorkspace;
    ws.BeginUpdate;
    Shape := ws.Shapes.Item(
0);
    Style := Shape.Style;
    Style.BackgroundBrushForeColor := GxColor.FromName(
"Red");
    Style.BackgroundBrushForeTransparent := 
30;
    Style.BackgroundBrushBackColor := GxColor.FromName(
"Blue");
    Style.BackgroundBrushBackTransparent := 
60;
    Style.BackgroundBrushPattern := GxBrushPattern.Diagonals;
    ws.EndUpdate;
End Sub Button1OnClick;
Imports Prognoz.Platform.Interop.Andy;
Imports Prognoz.Platform.Interop.Workspace;
Imports Prognoz.Platform.Interop.Drawing;

 
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    ws: IWxWorkspace;
    Shape: IWxShape;
    Style: IWxStyle;
    SColor: GxColorClassClass = 
New GxColorClassClass();
Begin
    ws := uiWorkspaceObjectNet1.WorkspaceObjectUi.Instance 
As IWxWorkspace;
    ws.BeginUpdate();
    Shape := ws.Shapes.Item[
0];
    Style := Shape.Style;
    Style.BackgroundBrushForeColor := SColor.FromName(
"Red");
    Style.BackgroundBrushForeTransparent := 
30;
    Style.BackgroundBrushBackColor := SColor.FromName(
"Blue");
    Style.BackgroundBrushBackTransparent := 
60;
    Style.BackgroundBrushPattern := GxBrushPattern.wbpDiagonals;
    ws.EndUpdate();
End Sub;

After executing the example the color fill with defined settings is set on clicking the Button1 component located on the shape of the UiWorkspaceObject1 component.

 

See also:

IWxStyle