Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-04

TLabel justification not obeyed (Lazarus 1.6 release)

5 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bo Berglund

I am making a form with a few spinedits and editboxes for the user to enter config data. After I have dropped these on the form I also add lables before them to hold the description.

So at the start I have Label1, Label2 and Label3 with the name as the caption.
Next I set the alignment property of all to taRightJustify in order to keep the set distance between the label and the control. So far so good, but when I start adding the correct caption text to the labels they grow towards the wrong end. Instead of the left end of the label moving left the right end moves in under the controls it is a description for.
This was a surprise because it is not working like this in Delphi. What did I do wrong?

Bo Berglund Developer in Sweden

Reply by email

Ondrej Pokorny
to Bo Berglund
Bo Berglund wrote 14 lines
I am making a form with a few spinedits and editboxes for the user to enter config data. After I have dropped these on the form I also add lables before them to hold the description. So at the start I have Label1, Label2 and Label3 with the name as the caption. Next I set the alignment property of all to taRightJustify in order to keep the set distance between the label and the control. So far so good, but when I start adding the correct caption text to the labels they grow towards the wrong end. Instead of the left end of the label moving left the right end moves in under the controls it is a description for. This was a surprise because it is not working like this in Delphi. What did I do wrong?

Do you use Lazarus trunk? I think I fixed that in trunk (fixed = changed it so that it behaves like in Delphi).

Ondrej

Reply by email

Ondrej Pokorny
to Ondrej Pokorny
Ondrej Pokorny wrote 18 lines
On 21.04.2016 19:07, Bo Berglund wrote: > I am making a form with a few spinedits and editboxes for the user to > enter config data. After I have dropped these on the form I also add > lables before them to hold the description. > > So at the start I have Label1, Label2 and Label3 with the name as the > caption. > Next I set the alignment property of all to taRightJustify in order to > keep the set distance between the label and the control. > So far so good, but when I start adding the correct caption text to > the labels they grow towards the wrong end. Instead of the left end of > the label moving left the right end moves in under the controls it is > a description for. > This was a surprise because it is not working like this in Delphi. > What did I do wrong? Do you use Lazarus trunk? I think I fixed that in trunk (fixed = changed it so that it behaves like in Delphi).

Yep, r52407. If it doesn't behave like you want (in trunk!), it is a bug.
+ It won't be merged to 1.6.

Ondrej

Reply by email

Bo Berglund
to Ondrej Pokorny: Do you use Lazarus trunk? I think I fixed that in trunk (fixed = changed it so that it…
Ondrej Pokorny wrote
Do you use Lazarus trunk? I think I fixed that in trunk (fixed = changed it so that it behaves like in Delphi).

I built Lazarus 1.6 from the sources downloaded using svn on the release tag for 1.6.

If it is corrected in trunk, when will it get to a release? I don't want to be on the bleeding edge if I can avoid it. OTOH at the moment it is not a big deal for me, I just observed it when I was re-entering stuff from a test I made in Delphi7. Now I want to make the same test on a Linux host and so I need Lazarus. The final target system is Linux.

Bo Berglund Developer in Sweden

Reply by email

Ondrej Pokorny
to Bo Berglund
Bo Berglund wrote 10 lines
On Thu, 21 Apr 2016 19:14:07 +0200, Ondrej Pokorny wrote: > Do you use Lazarus trunk? I think I fixed that in trunk (fixed = changed > it so that it behaves like in Delphi). I built Lazarus 1.6 from the sources downloaded using svn on the release tag for 1.6. If it is corrected in trunk, when will it get to a release? I don't want to be on the bleeding edge if I can avoid it.

I don't want to merge things that break compatibility into active fixes branch (I mean compatibility between 1.6.0 and 1.6.2, not between Delphi and Lazarus).

You'll have to wait for 1.8 with that. Lazarus has an approximate 1 year cycle for new stable releases, AFAIK.

Ondrej

Reply by email