Makara
Makara

Reputation: 233

Is there any ways to change color of label in RTC?

In the form, I would like to set the color of text in Label. Actually I can set it in Classic by using Label property called "FORECOLOR". but unfortunately in RTC doesn't change the color. Are there any ways to do so in RTC ?

Thanks in Advance, Makara

Upvotes: 2

Views: 6886

Answers (1)

Jake Edwards
Jake Edwards

Reputation: 1217

In the RTC the color options have been reduced. Essentially this is due to the change of "paradigm" in Forms vs Pages.

In Pages, controls have lost the ForeColor property, but gained the Style property. Essentially this changes the way NAV looks at data (knowing what the intention of the data is, rather than hard coding a color -- this allows new clients, such as the Web Client, to display it in it's own way if appropriate).

The style property can be set in the following ways (MSDN);

  • None (No colour)
  • Strong (Bold)
  • Attention (Red)
  • Favourable (Bold + Green)
  • Un-favourable (Bold + Italic + Red)

These 'styles' can be turned on and off using the Boolean StyleExpr property. This can be a variable to dynamically switch plain black, and the selected Style.

If you're using the transformation tool, the form property Forecolor is ignored and not translated to the Page's Style property. Properties in Forms and Pages are set independent of each other.

As for other colors, it's not possible out of the box. You could develop a Client Control add-in to create a custom control with colors however it seems a little bit of overkill. It'd have to be installed on all PC's that use NAV. I'd recommend just using the Style option :)

Upvotes: 3

Related Questions