FlexCel Studio for VCL/LCL
ContentsIndex
PreviousUpNext
TFlexCelImport.GetCellFormatDef Method

Returns the default format for an empty cell.

Pascal
procedure GetCellFormatDef(const aRow: integer; const aCol: integer; var F: TFlxFormat);
C++
__fastcall GetCellFormatDef(const int aRow, const int aCol, TFlxFormat F);
Parameters 
Description 
const aRow: integer 
Row of the cell (1 based). 
const aCol: integer 
Column of the cell (1 based). 
var F: TFlxFormat 
TFlxFormat structure where the value will be returned. 

Use this function when you want to create new formats not based on existing ones.

To create a cell format colored with the color nearest to clBlue, you could use: 

 

FlexCelImport.GetCellFormatDef(row, col, F);
F.FillPattern.FgColorIndex := F.NearestColorIndex(clBlue);
NewFormat := FlexCelImport.AddFormat(F);
 FlexCelImport.SetCellFormat(row, col, NewFormat);
Copyright (c) 2002-2008 TMS Software. All rights reserved.
What do you think about this topic? Send feedback!