Juan Carlos wrote: ↑Thu Jul 20, 2023 9:23 am
Error, I use layers this time and the result is that align left for the text lines instead of align right.
If you use the same code you get the same results of course. But then you have layer objects. You can query their horizontal size and change the position to align it in the way you want.
You really should try to understand how things work instead of expecting some magic. Look at your code. You set the x position of your lines with
DisplayTextObjectFX(). So this left position is determined.
---
Now I just read your last answer. If I had done this sooner, I wouldn't be trying to help anymore. But here's an approach you can go on with.
But we can't keep doing the work for you and listen to unkind replies for it.
Code: Select all
EnableLayers()
TextOut(0, 10, "DINERO", {Name="DINERO"})
TextOut(0, 30, "Perico 1000", {Name="P1000", Hidden=True})
TextOut(0, 50, "Perico 30", {Name="P30", Hidden=True})
xpos=300
w=GetAttribute(#LAYER, "DINERO", #ATTRWIDTH)
SetLayerStyle("DINERO", {X=xpos-w})
w=GetAttribute(#LAYER, "P1000", #ATTRWIDTH)
SetLayerStyle("P1000", {X=xpos-w})
w=GetAttribute(#LAYER, "P30", #ATTRWIDTH)
SetLayerStyle("P30", {X=xpos-w})
ShowLayerFX("P1000",{Type=#ZOOMCENTER})
ShowLayerFX("P30",{Type=#ZOOMCENTER})