Skip to main content
K.Daube
Community Expert
Community Expert
December 7, 2018
Question

Centering a TextLine

  • December 7, 2018
  • 0 replies
  • 277 views

Dear friends,

Again I was mislead by the name of a property

oTextLine.TextLineType = Constants.FV_TEXTLINE_CENTER;

I thought that this would be useful to center the text within a given space. But I could not find how to use it.

I found a straight-forward method:

Towards the end of my function I have inserted (aLenght is the space width):

  textLen = oTextLine.Width;

  boundLeft = (aLength*CM - textLen)/2;

  oTextLine.BasePointX = x0*CM + boundLeft;

This topic has been closed for replies.