delphidelphi-10.3-riovcl-styles

How to allow Label Font text colors in Delphi? ( Custom Styles issue )


I am trying to set Label font colors, like this:

See Image

But when I choose a Custom Style:

See Image

And then run the program, this is what I get:

See Image

The Label font color goes back to white (this only happen if I use one of the Custom Styles), but I really need the custom Styles ON in my program, and I also want the font colors for the Labels to remain colored and not white.

Is there any way to fix this?


Solution

  • The Vcl Styles determine the properties (like e.g. color) of a labels text. This can, however, be overruled by

    In code you can e.g. write

      Label4.StyleElements := Label4.StyleElements - [seFont];
      Label4.Font.Color := clRed;