ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1.Win.C1TrueDBGrid.Style.BackgroundPictureDrawMode Property

Gets or sets the rendering method for a BackgroundImage.

[Visual Basic]

Public Property BackgroundPictureDrawMode As BackgroundPictureDrawModeEnum

[C#]

public BackgroundPictureDrawModeEnum BackgroundPictureDrawMode {get;set;}

[Delphi]

public property BackgroundPictureDrawMode: BackgroundPictureDrawModeEnum read get_BackgroundPictureDrawMode write set_BackgroundPictureDrawMode;

Example

The following code fills each cell in the grid with an image and strectches it to fill the cell:

·      Visual Basic

       Me.C1TrueDBGrid1.Splits(0).Style.BackgroundImage = System.Drawing.Image.FromFile("C:\C1Logo.bmp")

       Me.C1TrueDBGrid1.Splits(0).Style.BackgroundPictureDrawMode = C1.Win.C1TrueDBGrid.BackgroundPictureDrawModeEnum.Tile

·      C#

       this.c1TrueDBGrid1.Splits[0].Style.BackgroundImage = System.Drawing.Image.FromFile("C:\C1Logo.bmp");

       this.c1TrueDBGrid1.Splits[0].Style.BackgroundPictureDrawMode = C1.Win.C1TrueDBGrid.BackgroundPictureDrawModeEnum.Tile;

·      Delphi

       Self.C1TrueDBGrid1.Splits[0].Style.BackgroundImage := System.Drawing.Image.FromFile('C:\C1Logo.bmp');

       Self.C1TrueDBGrid1.Splits[0].Style.BackgroundPictureDrawMode := C1.Win.C1TrueDBGrid.BackgroundPictureDrawModeEnum.Tile;

See Also

C1.Win.C1TrueDBGrid.Style Class | C1.Win.C1TrueDBGrid.Style Members | C1.Win.C1TrueDBGrid Namespace


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.