[]
        
(Showing Draft Content)

C1.Win.FlexGrid.C1FlexGridBase.CreateImage

CreateImage Method

CreateImage()

Creates an image of the entire grid.

Declaration
public Image CreateImage()
Public Function CreateImage() As Image
Returns
Type Description
Image

An Image object containing a metafile image of the grid.

Remarks

Use this method to copy grid images to the clipboard so you can paste them into documents or other applications.

Examples

The code below creates an image of a grid range and saves it to a PNG file that can be included in other documents such as web pages:

Image img = flex.CreateImage(0,0,10,5);
img.Save(@"c:\temp\grid.png", System.Drawing.Imaging.ImageFormat.Png);

CreateImage(int, int, int, int)

Creates an image of a portion of the grid.

Declaration
public Image CreateImage(int topRow, int leftCol, int bottomRow, int rightCol)
Public Function CreateImage(topRow As Integer, leftCol As Integer, bottomRow As Integer, rightCol As Integer) As Image
Parameters
Type Name Description
int topRow

Top row in the range.

int leftCol

Left column in the range.

int bottomRow

Bottom row in the range.

int rightCol

Right column in the range.

Returns
Type Description
Image

An Image object containing a metafile image of the grid.

Remarks

The image returned includes any fixed and frozen cells in addition to the specified range.

CreateImage(CellRange)

Creates an image of a portion of the grid.

Declaration
public Image CreateImage(CellRange rg)
Public Function CreateImage(rg As CellRange) As Image
Parameters
Type Name Description
CellRange rg

CellRange that specifies which cells should be included in the image.

Returns
Type Description
Image

An Image object containing a metafile image of the grid.

Remarks

The image returned includes any fixed and frozen cells in addition to the specified range.

CreateImage(int, int, int, int, EmfType)

Creates an image of a portion of the grid.

Declaration
public Image CreateImage(int topRow, int leftCol, int bottomRow, int rightCol, EmfType emfType)
Public Function CreateImage(topRow As Integer, leftCol As Integer, bottomRow As Integer, rightCol As Integer, emfType As EmfType) As Image
Parameters
Type Name Description
int topRow

Top row in the range.

int leftCol

Left column in the range.

int bottomRow

Bottom row in the range.

int rightCol

Right column in the range.

EmfType emfType

EmfType value that determines the type of metafile to create.

Returns
Type Description
Image

An Image object containing a metafile image of the grid.

Remarks

The image returned includes any fixed and frozen cells in addition to the specified range.

CreateImage(CellRange, EmfType, DrawColorMode)

Creates an image of a portion of the grid.

Declaration
public Image CreateImage(CellRange rg, EmfType emfType, DrawColorMode colorMode = DrawColorMode.Color)
Public Function CreateImage(rg As CellRange, emfType As EmfType, Optional colorMode As DrawColorMode = DrawColorMode.Color) As Image
Parameters
Type Name Description
CellRange rg

CellRange that specifies which cells should be included in the image.

EmfType emfType

EmfType value that determines the type of metafile to create.

DrawColorMode colorMode

result image color mode.

Returns
Type Description
Image

An Image object containing a metafile image of the grid.

Remarks

The image returned includes any fixed and frozen cells in addition to the specified range.