Hi Micha,
this feature already exists but align all lines of the text in the same way, this means that you
can't (actually) align the first line to the right and the second line to the left for example.
If you want align all the label contents just use the tag
Alignment inside the field
Text, see below, there is a Label declaration with the Alignment definition:
Code:
scui.NewObject( #IFOCLASS_LABEL,
"Title_Label",
{ x = 5, y = 5 },
{ x = 790, y = 40 },
{ Bevel = { Colors = { Fill1 = { r = 255, g = 255, b = 160 } } },
Text = { FontName = "Diamond.font", FontSize = 12 , Alignment = #TEXTALIGN_CENTER } },
{ Values = { "THIS IS A LABEL", "with hori & vert centered text!" }, Lines = 2 } )
You can align to the TOP and BOTTOM using the same tag, here are all possible alignments:
Code:
#TEXTALIGN_LEFT ; Align text to the left
#TEXTALIGN_RIGHT ; Align text to the right
#TEXTALIGN_HCENTER ; The text will be centered horizontally
#TEXTALIGN_TOP ; Align text to the top
#TEXTALIGN_BOTTOM ; Align text to the bottom
#TEXTALIGN_VCENTER ; The text will be centered vertically
#TEXTALIGN_CENTER ; Vertically and horizontally centering
You can combine horizontal and vertical alignments freely.
Ask if you need more detailed infos!
