Expand my Community achievements bar.

Change font colour in Text Field

Avatar

Former Community Member

If I have typed 'The Cat Sat On The Mat' into a text field yet I want 'The Cat' to appear in bold  and the rest as normal, how can I do this or even in a different colour?

Any help would be appreciated

6 Replies

Avatar

Level 2

The only way to do this, is a text field that you change from plain text to rich text. 

Then you can enter what you want, press ctrl+b to make something bold.

If you want to see the content of your box, use TextField.value.exData.saveXML() ...

Avatar

Former Community Member

That will apply bold to the whole sentence rather than just specific words

Avatar

Level 2

No, it will not.

Type in your sentence then double click on Cat for example to select one word and press ctrl+b.

Then have a look at the XML and you will see how you can do it.

Avatar

Former Community Member

Text.JPG

When you ctrl+b The Cat it makes the whole sentence bold

Avatar

Level 2

You should do this in preview or Acrobat, not in design mode.

Plus, don't forget to update the field from "plain text" to "rich text".

Avatar

Former Community Member

This is a prepopulated form that I would like to be able to use bold on certain words and not others prior to the users opening.

I will have to find a different solution for this.

Thank you for your help.