How to center a multiline text in label?

771
2
05-23-2023 01:32 PM
Boyang_Wang
Occasional Contributor II

Hello,

I am trying to create a symbol style with two lines, one line from one data field. I used Python script [field1]+"\r\n"+[field2] to create multiline labels, but I don't know how to control the alignment. As you can see in below screenshot, some letter B are aligned to the left and some are aligned to the right.

symbol_center.JPG

 

I tried to change label symbol position setting, but the alignment setting was greyed out. I am using Maplex Label Engine. Is there any way to adjust this?

symbol_setting.JPG

 

0 Kudos
2 Replies
RhettZufelt
MVP Frequent Contributor

I see the same thing unless I select "centered on point".

RhettZufelt_0-1684875017934.png

 

R_

0 Kudos
JesseWickizer
Esri Contributor

When labeling with the Maplex label engine, horizontal alignment is set by the label engine. Use the Maplex Stacking controls to constrain the alignment to center.

JesseWickizer_0-1700600498278.png