IVZControlStyle.Background

Fore Syntax

Background: IGxBrush;

Fore.NET Syntax

Background: Prognoz.Platform.Interop.Drawing.IGxBrush;

Description

The Background property determines the control background.

Fore Example

Executing the example requires that the repository contains an express report with the EXPRESS_REPORT identifier that contains bubble tree. Bubble tree timeline looks as shown on the IVZBubbleTree interface description page. Set new values for the timeline properties: background, border, font, font color, indents, margins and shadow color:

Add links to the Metabase, Express, Drawing, Visualizators system assemblies. This procedure should be called from the Main entry point.

Sub UserProc;
Var
    Metabase: IMetabase; // Repository
    EaxAnalyzer: IEaxAnalyzer; // Express report
    BubbleTree: IVZBubbleTree; // Bubble tree
    Timeline: IVZTimeLine; // Time scale
    Style: IVZControlStyle; // Time scale style
Begin
    // Get repository object
    Metabase := MetabaseClass.Active;
    // Get express report object
    EaxAnalyzer := Metabase.ItemById("EXPRESS_REPORT").Edit As IEaxAnalyzer;
    // Get bubble tree
    BubbleTree := EaxAnalyzer.BubbleTree.BubbleTree;
    // Get time line
    Timeline := BubbleTree.TimeLine;
    // Get time line style
    Style := Timeline.Style;
    // Set new background
    Style.Background := New GxSolidBrush.Create(New GxColor.CreateRGB(206157182));
    // Set new border color
    Style.BorderPen := New GxPen.CreateSolid(New GxColor.CreateRGB(16784125), 2);
    // Set border rounding radius
    Style.BorderRadius := 1;
    // Set new font
    Style.Font := New GxFont.Create("Tahoma"15);
    // Set new font color
    Style.FontColor := New GxColor.CreateRGB(000);
    // Determine shadow color
    Style.FontShadowColor := New GxColor.CreateRGB(25500);

    // Set element indents
    Style.Margin := New GxRectF.Create(15151515);
    // Set element margins
    Style.Padding := New GxRectF.Create(10101010);
    // Set shadow color
    Style.ShadowColor := New GxColor.CreateRGB(25500);
    // Set changed style
    Timeline.Style := Style;
    // Set changed time scale
    BubbleTree.TimeLine := Timeline;
    // Save changes to the express report
    (EaxAnalyzer As IMetabaseObject).Save;
End Sub UserProc;

After executing the example bubble tree timeline properties are changed in the express report: background, border, font, font color, indents, margins and shadow color:

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Visualizators;


Public Shared Sub Main(Params: StartParams);
Var
    Metabase: IMetabase; // Repository
    EaxAnalyzer: IEaxAnalyzer; // Express report
    BubbleTree: IVZBubbleTree; // Bubble tree
    Timeline: IVZTimeLine; // Time scale
    Style: IVZControlStyle; // Time scale style
    BackgroundBrush: GxSolidBrush; // Background color brush
    BackgroundColor: GxColor; // Background color
    BorderPen: GxPen; // Border color
    BorderColor: GxColor; // Border color
    Font: GxFont; // Font
    FontColor: GxColor; // Font color
    Margin: GxRectF; // Element indents
    Padding: GxRectF; // Element margins
    ShadowColor: GxColor; // Shadow color
Begin
    // Get repository object
    Metabase := Params.Metabase;
    // Get express report object
    EaxAnalyzer := Metabase.ItemById["EXPRESS_REPORT"].Edit() As IEaxAnalyzer;
    // Get bubble tree
    BubbleTree := EaxAnalyzer.BubbleTree.BubbleTree;
    // Get time line
    Timeline := BubbleTree.TimeLine;
    // Get time line style
    Style := Timeline.Style;
    // Set new background
    BackgroundColor := New GxColor();
    BackgroundColor.CreateRGB(206157182);
    BackgroundBrush := New GxSolidBrush();
    BackgroundBrush.Create(BackgroundColor);
    Style.Background := BackgroundBrush;
    // Set new border color
    BorderColor := New GxColor();
    BorderColor.CreateRGB(16784125);
    BorderPen := New GxPen();
    BorderPen.CreateSolid(BorderColor, 2);
    Style.BorderPen := BorderPen;
    // Determine border smoothing
    Style.BorderRadius := 10;

    // Determine border smoothing radius
    Style.BorderRadius := 1;

    // Set new font
    Font := New GxFont();
    Font.Create("Tahoma"15, GxFontStyle.gfsRegular, GxUnit.guInch);
    Style.Font := Font;
    // Set new font color
    FontColor := New GxColor();
    FontColor.CreateRGB(000);
    Style.FontColor := FontColor;
    // Set element indents
    Margin := New GxRectF();
    Margin.Create(15151515);
    Style.Margin := Margin;
    // Set element margins
    Padding := New GxRectF();
    Padding.Create(10101010);
    Style.Padding := Padding;
    // Set shadow color
    ShadowColor := New GxColor();
    ShadowColor.CreateRGB(25500);
    Style.ShadowColor := ShadowColor;
    // Save changes to the express report
    (EaxAnalyzer As IMetabaseObject).Save();
End Sub;

See also:

IVZControlStyle