DefaultStyle: ITabCellStyle;
DefaultStyle: Prognoz.Platform.Interop.Tab.TabCellStyle;
The DefaultStyle property determines the style applied to various table elements by default.
By default the DefaultStyle style does not have style settings. If any style settings are determined in DefaultStyle, they are applied to all table elements (row/column headers, data cells, corner cell and so on), if individual settings are not determined for these elements.
Executing the example requires a form with the Button1 button, the UiErAnalyzer component named UiErAnalyzer1 and any visual components displaying data of the express report, which is connected to UiErAnalyzer1.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Express: IEaxAnalyzer;
Grid: IEaxGrid;
Style: IEaxTableStyle;
Begin
Express := UiErAnalyzer1.ErAnalyzer;
Grid := Express.Grid;
Style := Grid.Style;
//Data cell style
Style.InternalStyle.BackgroundBrush := New GxSolidBrush.Create(GxColor.FromName("Aquamarine"));
//Default style
Style.DefaultStyle.BackgroundBrush := New GxSolidBrush.Create(GxColor.FromName("LightGreen"));
Grid.Refresh;
End Sub Button1OnClick;
Clicking the button sets background color for data cells. It also determines the background color that is applied for all table elements, which do not have their own background color.
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.
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
Express: EaxAnalyzer;
Grid: EaxGrid;
Style: EaxTableStyle;
ColorCls: GxColorClass = New GxColorClassClass();
Brush: GxSolidBrush = New GxSolidBrushClass();
Begin
Express := UiErAnalyzerNet1.ErAnalyzer.ErAnalyzer;
Grid := Express.Grid;
Style := Grid.Style;
//Data cell style
Brush.Create(ColorCls.FromName("Aquamarine"));
Style.InternalStyle.BackgroundBrush := Brush;
//Default style
Brush.Create(ColorCls.FromName("LightGreen"));
Style.DefaultStyle.BackgroundBrush := Brush;
Grid.Refresh();
End Sub;
See also: