BackgroundPictureWrapMode: TabFormatWrapMode;
The BackgroundPictureWrapMode property determines the method of background image overlay.
Executing the example requires a form with the Button1 button located on it, the TabSheetBox component named TabSheetBox1, and a data source for TabSheetBox1.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
TSheet: ITabSheet;
Selection: ITabRange;
Style: ITabCellStyle;
i: Integer;
Begin
TSheet := TabSheetBox1.Source.GetTabSheet;
i := TSheet.Images.Add(GxImage.FromFile("c:\Background.png"));
Selection := TSheet.View.Selection.Range;
//Style parameters
Style := Selection.Style;
//Setting image
Style.EnablePictures := TriState.OnOption;
Style.BackgroundPicture := i;
Style.BackgroundPictureWrapMode := TabFormatWrapMode.Tile;
End Sub Button1OnClick;
On clicking the button a new background image is set for the cells selected in TabSheetBox1: the image is loaded from the specified file and will be tiled to fill each cell area.
See also: