2

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

Makara
  • 233
  • 1
  • 8
  • 23

1 Answers1

3

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 :)

Jake Edwards
  • 1,190
  • 11
  • 24
  • The property of Style and StyleExpr are available in only Page Object. But form doesn't have. How can I change that? I would like to change Label of form. any other ways ? – Makara Aug 31 '12 at 02:51
  • Are you using the Transformation tool? You may need to clarify your question to highlight exactly what you need. Forms only have the FORECOLOR property, and Pages only have the Style property. There is no mapping between them and both options are completely independent of one another. – Jake Edwards Aug 31 '12 at 04:44
  • I am sorry that I confusing you. I just want to set color to my Label In NAV. Do you have any idea about that ? – Makara Sep 01 '12 at 02:22
  • Classic: Can be done. RTC: Cannot be easily done. That's all unfortunately :( – Jake Edwards Sep 04 '12 at 00:44