ITabRegion.BorderStyle

Syntax

BorderStyle: TabBorderStyle;

BorderStyle: Prognoz.Platform.Interop.Tab.TabBorderStyle;

Description

The BorderStyle property determines region border line type.

Comments

To determine region border color, use the ITabRegion.BorderColor property.

Example

Executing the example requires a regular report in the repository. with connected module. The connected module and the EventsClass class must be specified as event handler.

Add links to the Drawing, Report, Tab system assemblies.

Class EventsClass: ReportEvents
    
Public Sub OnAfterRecalcSheet(Sheet: IPrxSheet);
    
Var
        
        Tab: ITabSheet;
        Reg: ITabRegion;
    
Begin
        
// Get report sheet table
        Tab := Sheet.Table;
        
// Add a region to collection
        Reg := Tab.Regions.Add;
        
// Determine table range where region is located
        Reg.Range := Tab.Cells(1133);
        
// Set background color of table region
        Reg.BackgroundColor := New GxColor.CreateARGB(6425500);
        
// Set border color of table region
        Reg.BorderColor := New GxColor.CreateRGB(25500);
        
// Set line type of table region border
        Reg.BorderStyle := TabBorderStyle.Double;
        
// Set line width of table region border
        Reg.BorderWeight := TabBorderWeight.Hairline;
        
// Set visibility of table region
        Reg.Visible := True;
        
// Add the second region to collection
        Reg := Tab.Regions.Add;
        
// Determine the second table range where region is located
        Reg.Range := Tab.Cells(2244);
        
// Set formatting of the second table region
        Reg.BackgroundColor := New GxColor.CreateARGB(6400255);
        Reg.BorderColor := 
New GxColor.CreateRGB(00255);
        Reg.Visible := 
True;
    
End Sub OnAfterRecalcSheet;
End Class EventsClass;

Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;

Class EventsClass: ReportEventArgsClass
    
Public Sub OnAfterRecalcSheet(Sheet: IPrxSheet);
    
Var
        Tab: ITabSheet;
        Reg: ITabRegion;
        Color: GxColorClass_2 = 
New GxColorClass_2();
    
Begin
        
// Get report sheet table
        Tab := Sheet.Table;
        
// Add a region to collection
        Reg := Tab.Regions.Add();
        
// Determine table range where region is located
        Reg.Range := Tab.Cells[1133];
        
// Set background color of table region
        Color.CreateARGB(6425500);
        Reg.BackgroundColor := Color;
        
// Set border color of table region
        Color.CreateRGB(25500);
        Reg.BorderColor := Color;
        
// Set line type of table region border
        Reg.BorderStyle := TabBorderStyle.tbsDouble;
        
// Set line width of table region border
        Reg.BorderWeight := TabBorderWeight.tbwHairline;
        
// Set visibility of table region
        Reg.Visible := True;
        
// Add the second region to collection
        Reg := Tab.Regions.Add();
        
// Determine the second table range where region is located
        Reg.Range := Tab.Cells[2244];
        
// Set formatting of the second table region
        Color.CreateARGB(6400255);
        Reg.BackgroundColor := Color;
        Color.CreateRGB(
00255);
        Reg.BorderColor := Color;
        Reg.Visible := 
True;
    
End Sub OnAfterRecalcSheet;
End Class EventsClass;

After executing the example, on report update two regions will be selected that will have different colors and different borders.

See also:

ITabRegion