TextAlignment in TableColumns (RPG/DDS)

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Post Reply
JoeHam
Posts: 14
Joined: Thu Jul 19, 2012 5:35 pm

TextAlignment in TableColumns (RPG/DDS)

Post by JoeHam »

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!
tsupartono
Posts: 289
Joined: Wed Apr 18, 2012 10:21 am

Re: TextAlignment in TableColumns (RPG/DDS)

Post by tsupartono »

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'

Code: Select all

     A                                       Col%1
     A                                       (
     A                                         Content.TextAlign: Center
     A                                         Name: NAME
     A                                         Type: Label
     A                                         Header.Value: "Name"
     A                                       )
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':

Code: Select all

     A
     A                                       Row%2.NAME.TextAlign: Center
     A

Post Reply