BackgroundBrush: IGxBrush;
BackgroundBrush: Prognoz.Platform.Interop.Drawing.IGxBrush;
The BackgroundBrush determines the brush that is used to fill cell background.
The instance of one of the following classes can be specified as the property value:
GxHatchBrush. Hatch brush with specified color.
GxLinearGradientBrush. Linear gradient brush.
GxSolidBrush. Solid color fill brush.
To execute the example a form, button on it named Button1, the TabSheetBox component named TabSheetBox1 and the UiErAnalyzer component which is set to express report and which is data source for the TabSheetBox component are required.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Selection: ITabRange;
Style: ITabCellStyle;
Begin
Selection := TabSheetBox1.Source.GetTabSheet.View.Selection.Range;
Style := Selection.Style;
Style.BackgroundBrush := New GxSolidBrush.Create(GxColor.FromName("Green"));
End Sub Button1OnClick;
Clicking the button changes the background image style for the cells selected in TabSheetBox1, that is, background is filled with green.
The requirements and result of the Fore.NET execution match with those in the Fore Example. Use Fore.NET analogs instead of Fore components.
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Tab;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
Selection: ITabRange;
Style: ITabCellStyle;
ColorCls: GxColorClass = New GxColorClassClass();
Brush: GxSolidBrush = New GxSolidBrushClass();
Begin
Selection := TabSheetBoxNet1.Source.GetTabSheet().View.Selection.Range;
Style := Selection.Style;
Brush.Create(ColorCls.FromName("Green"));
Style.BackgroundBrush := Brush;
End Sub;
See also: