Hello everybody,
we are quite new in developing with longrange and after finishing the tutorials we started to create our own applications.
Now we have a question concerning the design of the app:
How can we align text in table columns (column type: label)? It seems that by default text alignment is "left" - how can we change this for single columns?
Many thanks in advance!
TextAlignment in TableColumns (RPG/DDS)
-
tsupartono
- Posts: 289
- Joined: Wed Apr 18, 2012 10:21 am
Re: TextAlignment in TableColumns (RPG/DDS)
You can use the 'TextAlign' property ('TextAlign' is one of the properties of a label).
To change the 'TextAlign' property of all labels in one column, you prefix it with 'Content' property.
Example below change text alignment of first column to 'Center'
So 'Content' basically acts like a template for all labels in that column - so when you change a property of the 'Content', that affects all labels in that column.
If you want, you can also change TextAlign (or any other properties) of an element in a particular row only.
For example, to change the TextAlign for the NAME column, just for the second row (Row%2) to 'Center':
To change the 'TextAlign' property of all labels in one column, you prefix it with 'Content' property.
Example below change text alignment of first column to 'Center'
Code: Select all
A Col%1
A (
A Content.TextAlign: Center
A Name: NAME
A Type: Label
A Header.Value: "Name"
A )
If you want, you can also change TextAlign (or any other properties) of an element in a particular row only.
For example, to change the TextAlign for the NAME column, just for the second row (Row%2) to 'Center':
Code: Select all
A
A Row%2.NAME.TextAlign: Center
A