You're reading ...
Traincontroller

Traincontroller 47: HTML in Text Fields

In TC9 we can use HTML (Hyper Text Markup Language) code inside text fields. This makes that we can use styling, like different font sizes, (background) colors, borders and more, in one and the same text field.

HTML is the language that is used on the WWW to render web pages. Luckily it is easy to experiment and to learn with the help of this wonderful website w3schools.

If you prefer to use a code editor … notepad++ is free and it is a very nice one.

About RudyB

Hobbyist

Discussion

2 thoughts on “Traincontroller 47: HTML in Text Fields

  1. Hello Rudy

    I tried several ways to change the background color by HTML of a text field, but unfortunately it did not work properly. As long as the text field is small it seems to be okay, but once enlarged the color basically underlies the text only. It seems that there is a pixel limitation of the color area. ???? In w3schools it works perfectly. I used the following HTML code:

    My first paragraph.

    Adding width or margin and padding does not change the result. What am I doing wrong? How do I change the background color of the entire text field by HTML properly?
    By the way: there is an actual post in the TC Forum how to add a train name to a text field with this problem outlined.

    Thanks for your help, which may be in German if better for you.

    Marek

    Like

    Posted by Marek | August 5, 2020, 08:04
    • Maybe you’re not doing anything wrong. It’s just that not all HTML tags are included, just a subset, but it’s not documented so it’s trial and error. If you follow the video … those are things that are possible.

      Like

      Posted by RudyB | August 5, 2020, 09:10

Leave a comment

Archive of all posts