Skip to Content
avatar image
Former Member

setting the colour of the text in an input-field or text-field

Hy,

I am using an input-field or text-field within a table-cell. For some rows in the table the text in the input-field / text-field should be red. How can I do this ?

Florian Hroch

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Dec 02, 2005 at 09:40 AM

    HI Florian,

    If u want to change the color of the text field then go to the properties of the text field and in that change the semantic color to the desired one u want.

    Hope this helps u.

    Regards,

    Arun.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 02, 2005 at 10:01 AM

    Hi Florian

    You can set the cell color or the background color of the table but can't color the text in the inputfield.Please refer to the following posts.

    is-font-color-font-type-changing-possible

    Regards

    Vijayakhanna Raman

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 02, 2005 at 05:58 PM

    Create a new attribute "TextColor" of type "com.sap.ide.webdynpro.uielementdefinitions.TextViewSemanticColor" (local DDIC types), under the table's data source node.

    Bind the "TextView.semanticColor" property of the table cell editor to this attribute.

    If you cannot add new attributes under the data source node (this is the case if there is a structure binding), add a value node "TableProperties" (cardinality 1:1, selection 1:1) under the data source node and add the attribute there.

    Then you can control the color of the TextView in table row at index i by setting the "TextColor" value for node element at index i.

    For an input field, you cannot set the text color, a workaround might be adding an icon in an extra column.

    Armin

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 14, 2005 at 07:30 PM

    " Then you can control the color of the TextView in table row at index i by setting the "TextColor" value for node element at index i. "

    how i can do this??

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Table data source node: "Rows", attribute "TextColor"

      Bind property "TextView.semanticColor" to attribute "Rows.TextColor".

      Assign e.g. WDTextViewSemanticColor.CRITICAL to "Rows" element at index i:

      TextView in table row at index i will get colored accordingly.

      Armin