Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Font size and text alignment changing for no reason in Delphi 10


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Feb 19, 2018 11:31 AM Last Post By: WILLIAM BENATTI Threads: [ Previous | Next ]
WILLIAM BENATTI

Posts: 5
Registered: 11/20/17
Font size and text alignment changing for no reason in Delphi 10  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 18, 2018 12:58 PM
Hi!, In an Android application with FireMonkey I'm using TLabel in several places in my code. I have seen weird behavior regarding random changes in font size and text alignment. These properties are set to Design Time: TLabel has TAlign = None, Autosize = False, TextSettings.HorzAlign = Leading, AutoTranslate = False and default font. The problem is occurring at runtime. I've already tried setting the properties via code too, but it did not work.

How to fix or prevent this?

thanks
WILLIAM BENATTI

Posts: 5
Registered: 11/20/17
Re: Font size and text alignment changing for no reason in Delphi 10  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 19, 2018 11:31 AM   in response to: WILLIAM BENATTI in response to: WILLIAM BENATTI
Problem solved! Apparently there's a BUG in the compiler or whatever ...
To solve the problem I adjusted fonts and alignments in design time, as I had already done, but I added a TStyleBook to the main form. I just dropped TStyleBook and set `StyleBook = StyleBook1` property of the main form. It was not necessary to create or change any styles of any controls. After that, font sizes and styles of TLabel stopped changing for no reason.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02