• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Centering a TextLine

Community Expert ,
Dec 07, 2018 Dec 07, 2018

Copy link to clipboard

Copied

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:

CenterTextLine2.png

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;

TOPICS
Scripting

Views

225

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation