Home › Forums › Problems and solutions in GDL › Documentation elements, text handling › Paragraph/textblock/label text alignment › Reply To: Paragraph/textblock/label text alignment
September 9, 2016 at 10:56
#2706
Member
Hi James,
I hope this short script will help you with the alignment problem:
! fontType and fontSize are parameters
define style{2} "NormalStyle" fontType, fontSize, 0
style "NormalStyle"
if sgn(LABEL_POSITION[2][1]) = -1 then
_iAlign = 3
else
_iAlign = 1
endif
paragraph "paragraphName" _iAlign,
0, 0, 0,
1
style "NormalStyle"
"sample Text of Label"
endparagraph
_textblockWidth = 7 ! Just for example
textblock "stTextblockName" _textblockWidth,
1, 0, 1, 1, 0,
"paragraphName"
richtext2 0, 0, "stTextblockName"
It results the behaviour you can see on the attached picture. If it does not solve your problem, please upload the 2D script or the object which you are working on.
Attachments:
Csilla Mai
Library Developer, Library Team
GRAPHISOFT SE