cancel
Showing results for 
Search instead for 
Did you mean: 

How to change color of a word in textedit

anoop_gupta2
Participant
0 Kudos

hey all,

i have a textedit and i want a certain words to get hilighted in that .. please help...

thx and regards.

Anoop

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Not possible.

Armin

Former Member
0 Kudos

Hi,

Create an attribute lets say"SymanticColor" of type com.sap.ide.webdynpro.uielementdefinitions.TextViewSemanticColor

bind this as following and set the respective color.


IWDTextView texts = (IWDTextView)view.createElement( IWDTextView.class, null );
      word.bindSemanticColor("SymanticColor"  );

set the respective color


wdContext.currentContextElement().setSemanticColor(WDTextViewSemanticColor.CRITICAL);

Their are other constans too which you can explore.

Regards

Ayyapparaj

anoop_gupta2
Participant
0 Kudos

hey dear.. thankx for the reply ..

ur answer is working fine with textView but there is no such method as bindSemanticColor with TextEdit..

please suggest .

Thnkx n Regards

Anoop

Former Member
0 Kudos

Hi Anoop,

You cannot set semantic colors on the context .As the text entered is not a UI element control infact .this is simply not possible..

Thanks,

Ashok

anoop_gupta2
Participant
0 Kudos

Hey Ashok,

I want to make spelling checking utility using WebDynpro for that i require a textview ,with color option on,

if thats not possible in WebDynpro then can you please suggest me and alternative for that .

any suggestion will be very helpfull .

Thanks & Regards.

Anoop

Former Member
0 Kudos

Hi Anoop,

If you want to try with web dynpro ..try iframe control which allows you to do some html.

And as allways with html you can acheive most of the color requirements you have.

You can also use textview with semantic color option outside this control as well if required.

If not web dynpro ..you may think of going with portal components..

Reward point for useful answers.

Many Thanks,

Ashok