user96546
user96546

Reputation: 57

How to set the color of a substring in a textbox in GWT?

I have a piece of code like this :-

**mdg.setHTML("This will call @ " +phoneWidget.getLabelText()+" "+ phoneWidget.getTextBoxValue());**

Now I need to change the font-color and style of phoneWidget.getLabelText() and phoneWidget.getTextBoxValue()

where mdg is a text-box.

How do I do it in GWT ?

Upvotes: 0

Views: 167

Answers (1)

You are pasting HTML into the dialog, so you can use whatever methods you'd use to set the color of HTML text. I suggest using a span tag around your highlighted values with appropriate CSS

Upvotes: 1

Related Questions