cancel
Showing results for 
Search instead for 
Did you mean: 

Change colour of Text View

Former Member
0 Kudos

Hi.

How to change the colour of the Textview component?

Regards

Bala

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

try out this code.

IWDTextView <Name>=(IWDTextView)view.createElement(IWDTextView.class, "<Name>");

<Name>.setText("Name");

<Name>.setDesign (WDTextViewDesign.HEADER2);<Name>.setSemanticColor(WDTextViewSemanticColor.DIMINISHED);

Regards,

gopi

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Balachandar,

For a text view, a simple method to change its appearance is to use its 2 properties:

Design: which allows you to change the font-size(style) of the text in the text view

and

SemanticColor: which allows you to change the color of the text.

(positive - green, negative - red, etc.)

And if you just want to display a title or so then you can use UI element CAPTION.

Regards.

Former Member
0 Kudos

Hi,

AS per my understanding you can change the color of the Textview to red ..and also you can make some style of the text ...

or else you may need to use application specific themes.

giving below the blog that you can go through

/people/lisha.peter/blog/2005/07/07/make-your-webdynpro-application-theme-specific

Regards

AM

Former Member
0 Kudos
Context:
- TextColor (attribute, type=com.sap.ide.webdynpro.uielementdefinitions.TextViewSemanticColor)

Data binding:
TextView.semanticColor -> TextColor

Code:
wdContext.currentContextElement().setTextColor(WDTextViewSemanticColor.POSITIVE);

Armin

Former Member
0 Kudos

Hi Balachandar,

You can change the color of the Text View by changing the property <b>semanticColor</b> to the required color.

Regards,

Jhansi

null