FlexCel Studio for VCL/LCL
ContentsIndex
PreviousUpNext
TFlexCelImport.SetCellComment Method (integer, integer, UTF16String, TImageProperties)

Assigns/deletes the comment on a given cell.  

 

Pascal
procedure SetCellComment(Row: integer; Col: integer; const Value: UTF16String; const Properties: TImageProperties); overload;
C++
__fastcall SetCellComment(int Row, int Col, const UTF16String Value, const TImageProperties Properties);
Parameters 
Description 
Row: integer 
Row of the cell with the comment (1 based). 
Col: integer 
Column of the cell with the comment (1 based). 
const Value: UTF16String 
String with the comment. 
const Properties: TImageProperties 
This parameter lets you specify the properties of the comment box that displays when you hover over the cell.
Only the Col1, dx1, Row1, dy1, Col2, dx2, Row2, dy2 members of Properties have meaning. The FileName member is not used here.
  • Col1,Row1, Col2 and Row2 are the starting/ending cells for the box.

* dx1 and dx2 are the x offset from the starting/ending cells, and they are measured as a 1/1024 part of the cell.For example:
  • a box starting on Col1=3 and dx1=0 will start at the beginning of column 3
  • a box starting on Col1=3 and dx1=512 will start at the middle of column 3
  • a box starting on Col1=3 and dx1=1023 will start at the last pixel of column 3

* dy1 and dy2 are the y offset from the starting/ending cells, and they are measured as a 1/255 part of the cell. (dy=127 means the middle of the cell) 

If you assign an empty string, the comment on the cell will be deleted. 

 

On this version of the method, you can also specify the size for the yellow box including the comment.

Copyright (c) 2002-2008 TMS Software. All rights reserved.
What do you think about this topic? Send feedback!