How to have some part of the text with a different style, based on a condition

Imagine that when some condition is true, you want to have a warning text, in red, in your web screen.

You may use the If Widget for this purpose.

But you may find that using an Expression Widget is easier and leaves you with a cleaner design mode screen:

  1. Drag an Expression widget where you want this different text to be displayed (may be inside the text flow, if you wish)

  2. Fill the Expression with the following condition:
    FormatBoolean([condition],"[TEXT] or Text expression","" )

  3. Set the Style property of your Expression Widget to the desired one

  4. Optionally, change the Example property of your Expression Widget.