Discussion:
TextArea background color issue
Sriram Gellu
2018-07-09 11:16:53 UTC
Permalink
Hi All ,

Greetings!

I have creates a TextArea element and added it to HorizontalPanel.
Now, I want to highlight background of TextArea with some color.

I used below lines ,


tfDesc.getElement().getStyle().setBackgroundColor("#*fdfdbb*");



tfDesc.setStyle("background-color:#fdfdbb");



The problem is whenever some text is populated in the Text area , the
background color behind the text goes off , will be white color but
the other lines(where text is not present) stay in color in assigned.



Please help!


Thanks.
--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
Frank
2018-07-09 14:25:50 UTC
Permalink
Please provide some more code.

I am thinking you are replacing the TextArea with another one when setting
the text or something like that.



And by TextArea. You mean the plain vanilla GWT TextArea ? Not bootstrap or
Material or something else ?
--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
Sriram Gellu
2018-07-10 11:07:45 UTC
Permalink
com.gwtext.client.widgets.form.TextArea is the class
here is the code


TextArea tfDesc = new TextArea("CP Description", "cpDesc");
tfDesc.setLabelStyle("width:150px");
tfDesc.getElement().getStyle().setBackgroundColor("#fdfdbb");

-- setters and getters of TextArea
assining value to textarea field,

this.getTfDesc().setValue((String) details.get("Desc"));
--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...