FlexCel Studio for VCL/LCL
ContentsIndex
PreviousUpNext
TFlexCelImport.AssignPicture Method (integer, ByteArray, TXlsImgTypes, integer, integer, integer, integer, integer, integer, TFlxAnchorType)

Assigns a New image to an existing one.

Pascal
procedure AssignPicture(const aPos: integer; const Pic: ByteArray; const PicType: TXlsImgTypes; const Row: integer; const Col: integer; const dh: integer; const dw: integer; const ImgHeight: integer; const ImgWidth: integer; const Anchor: TFlxAnchorType = at_MoveAndDontResize); overload;
C++
__fastcall AssignPicture(const int aPos, const ByteArray Pic, const TXlsImgTypes PicType, const int Row, const int Col, const int dh, const int dw, const int ImgHeight, const int ImgWidth, const TFlxAnchorType Anchor = at_MoveAndDontResize);
Parameters 
Description 
const aPos: integer 
Position of the image in the list. Goes between 0 and PicturesCount-1 
const Pic: ByteArray 
This is the raw data for the image.  
const PicType: TXlsImgTypes 
This is the image type for the new image. Picture might be PNG, JPEG, WMF or EMF 
const Row: integer 
Row where the imaged will be moved. 
const Col: integer 
Column where the imaged will be moved. 
const dh: integer 
Delta x of image respective to Col, on 1/1024 of a cell. 0 means totally at the left, 512 on half of the cell, 1024 means at the left of next cell. 
const dw: integer 
Delta y of image respective to Row, on 1/255 of a cell. 0 means totally at the top, 128 on half of the cell, 255 means at the top of next cell.  
const ImgHeight: integer 
Height of the image in Excel internal units (1/20th of a point) 
const ImgWidth: integer 
Width of the image in Excel internal units (Character width of "font 0" / 256) 
const Anchor: TFlxAnchorType = at_MoveAndDontResize 
How the image will behave when inserting, deleting, moving or copying rows and columns.

 

This method changes an image on the worksheet. Note that with this procedure you can change an existing image, not insert new ones. For inserting new images, use AddPicture.

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