question on TClientAnchor

I have a question in TClientAnchor. I am using it because I ran an existing sheet through ApiMate. So in this line:


ImgProps.Anchor := TClientAnchor.Create(TFlxAnchorType.MoveAndDontResize, ARow, 30, ACol, 0, ARow + 1, 0, ACol + 4, 0);

I am fine with the row and column parameters, but the aDx1, aDx2, aDy1, and aDy2 I do not understand. In the help file, I see their names, but no information as their use. I would appreciate some further illumination.

Thanks!

Hi,

Those parameters define the offset from the cell. For example, if dx = 0, then the image starts right at the top of Row1.  Dx = Max (for a row max is 255) means the image starts at Row1 + 1. And a Dx of say 128 would mean the image starts at the middle of Row1.
While those parameters are not documented in the constructor, they are documented as properties of TClientAnchor.

You can see them here:
http://www.tmssoftware.biz/flexcel/doc/!!MEMBERTYPE_Properties_FlexCel_Core_TClientAnchor.html

(note that the online doc is a little old and very slow, so yourself, use the offline help. But I paste the link here because I can link to online docs only. Someday I must see how to migrate from docomatic to something else which is maintained, but I never get the time)


But well, this is just it. The only tricky part is that for rows you use 255  as "max dx" and for columns 1024 as the "max dy". This is of course because this is how Excel defines them (and FlexCel tries to be low level, so it doesn't translate that to more "rational" units). But it also makes kind of sense, since columns are normally wider than higher, and so you need more resolution in the x direction.

If you prefer to deal with points (1/72 of an inch) or device independent pixels (1/96 of an inch), there are constructors which allow you to define that instead.



Thanks, Adrian.


That is not present in the CHM file. I do not have access to the integrated help, as we have a unified process for component installation, which does not use your installer.

It should be in the chm file. If you search for TClientAnchors, then click in Properties, don't you see it? I see it here:


http://www.tmssoftware.biz/flexcel/img/clientanchor.png


Now I see the problem. In the TClientAnchor entry, the fields are presented as links. So FDx1, not Dx1. In the Index, Dx1 is presented, and leads to the correct content. A bit odd.


Since the link on the FDx1 leads to a page which simply says it is for internal use, it is not much help. So it is a matter of my needing to use the index, in preference to hot-links.

Thanks!

Yes, there seems to be something wrong with the docomatic documenting private fields, like FDx1.

I guess this is because they are declared "strict private" and not "private" and probably docomatic doesn't understand it. As said, it is in my todo list to someday move from docomatic to document insight. But last time I tried document insight it crashed with FlexCel code, so I am giving it time to improve.

I personally just ctrl-click the FlexCel object (you need to do it twice, because the fist ctrl-click goes to a proxy unit). All documentation in the chm is from the xml docs in the code, so you can read the code directly (if you skip over the <xml> tags). Of course, for this to work you need to setup the browse path correctly. The installer does it, but if you have another build system, you should see that the browse path points to the FlexCel folders.