Hi!
I have a pb when I set the property AutoSize of TAnnotationTool to TRUE .
The values returned by the properties height and width of the TAnnotationTool are always wrong (even TAnnotationTool.Shape.height and TAnnotationTool.Shape.width).
So how can I know the height and width of the TAnnotationTool ?
Thanks in advance.
TAnnotationTool AutoSize
TAnnotationTool AutoSize
franckgar
Hi ,
you can read TAnnotationTool->Shape->ShapeBounds rectangle to
get annotatiton tool bounding rectangle. The rest is easy :
TRect r = AnnotationTool->Shape->ShapeBounds;
Width = r.Right - r.Left;
Height = r.Bottom - r.Top;
you can read TAnnotationTool->Shape->ShapeBounds rectangle to
get annotatiton tool bounding rectangle. The rest is easy :
TRect r = AnnotationTool->Shape->ShapeBounds;
Width = r.Right - r.Left;
Height = r.Bottom - r.Top;
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi,
this depends in which event you place the code, it works fine placing it in the OnAfterDraw event.
this depends in which event you place the code, it works fine placing it in the OnAfterDraw event.
Pep Jorge
http://support.steema.com
http://support.steema.com
Hi Pep,
I tested the value of AnnotationTool->Shape->Right and AnnotationTool->Shape->Bottom in the OnAfterDraw event and I always found 0 (perhaps due to the property AUTOSIZE = TRUE).
The only solution I have found is to recalculate manually the height and width of the AnnotationTool, like the function MultiLineTextWidth() into the unit TeEngine.pas. For the moment this solution is acceptable for me.
Bye
I tested the value of AnnotationTool->Shape->Right and AnnotationTool->Shape->Bottom in the OnAfterDraw event and I always found 0 (perhaps due to the property AUTOSIZE = TRUE).
The only solution I have found is to recalculate manually the height and width of the AnnotationTool, like the function MultiLineTextWidth() into the unit TeEngine.pas. For the moment this solution is acceptable for me.
Bye
franckgar