Shifting text down
Posted: Wed Sep 28, 2016 1:06 pm
I have two text items on a data band. One is a long text, and is set to word wrap and grow to fit the text. The other is a simple text that needs to be aligned to the bottom of the first. So the appearance is like:
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx yyyy
Now, there is automatic growth in all sorts of ways, but none that seems to fit. With the alignment of the second to bottom and set to grow to height, it does not align nicely.
I therefore thought I would code this, so I have tried to get this to work:
TextSecond.Top = TextFirst.Top + TextFirst.Height - TextSecond.Height;
However, no matter which event I put it in, it always ends up aligned at the top of the first. It seems as though the height of the first is not updated at the point of the events. Could you point me in the right direction please? (If there is an order dependency, please let me know how to specify the ordering, as I cannot see anything obvious other than the front/back mode.)
My ideal would be a shift mode that specified to move the component top and not grow, but this only appears possible if the top is below the first.
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx yyyy
Now, there is automatic growth in all sorts of ways, but none that seems to fit. With the alignment of the second to bottom and set to grow to height, it does not align nicely.
I therefore thought I would code this, so I have tried to get this to work:
TextSecond.Top = TextFirst.Top + TextFirst.Height - TextSecond.Height;
However, no matter which event I put it in, it always ends up aligned at the top of the first. It seems as though the height of the first is not updated at the point of the events. Could you point me in the right direction please? (If there is an order dependency, please let me know how to specify the ordering, as I cannot see anything obvious other than the front/back mode.)
My ideal would be a shift mode that specified to move the component top and not grow, but this only appears possible if the top is below the first.