Skip to Content
avatar image
Former Member

How do I know if it is possible to set colors ?

Hi all,

Here's what I have

Part of the code from View.xml

<TreeTable ...
<Column width="9rem">
     <m:Label text="Price"/>
             <u:Currency value="{amount}" currency="{currency}"/>

I want the values in the fields "value" and "currency" had color.

I need to use sap.m.ValueColor, but API sap.ui.unified.Currency have nothing to do this.

Can I do it here? Or need to use a more suitable container? For example:

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Dec 30, 2017 at 04:20 PM


    Here is the parallel to sap.m.ValueColor and the part of the XML to change

    sapUiIconColorCritical    Yellow   = sap.m.ValueColor.Critical
    sapUiIconColorNeutral     Grayish  = sap.m.ValueColor.Neutral
    sapUiIconColorPositive    Green    = sap.m.ValueColor.Good
    sapUiIconColorNegative    Red      = sap.m.ValueColor.Error
    <u:Currency class="sapUiIconColorPositive" value="{amount}" currency="{currency}"/>
    Add comment
    10|10000 characters needed characters exceeded