0

i have a textArea where i show some errors happened during a file loading. Now i will want customize my text area in this way:

enter image description here

I want to show a few character in bold, I saw that Label consent this,but can I also do this with a textarea?

Skizzo
  • 2,883
  • 8
  • 52
  • 99
  • to my knowledge you can not do this, was this component represents the regular textarea from HTML. i guess you could use the ``RichTextArea``, which is used to edit HTML code. Or if you need more control over the controls above the input get the chkeditor-wrapper from the addons. – cfrick Mar 11 '14 at 17:56

3 Answers3

4

I solved using a RichTextArea whitout top and bottom toolbar

.no-toolbar-top .gwt-RichTextToolbar-top{ 
display: none;
}

.no-toolbar-bottom .gwt-RichTextToolbar-bottom{ 
display: none;
}

Then i added these styles at components:

RichTextArea myArea = new RichTextArea();
myArea.addStyleName("no-toolbar-top");
myArea.addStyleName("no-toolbar-bottom");
myArea.setValue("<p><small> Error <b> Row 1 Col 2 </b> error description </small></p>");
Skizzo
  • 2,883
  • 8
  • 52
  • 99
2

To do this you have to use the RichTextArea component or create your own widget.

Btw: you can hide buttons from the toolbar: https://vaadin.com/forum/#!/thread/171171

nexus
  • 2,937
  • 3
  • 17
  • 22
2

I agree to the earlier answers saying that RichTextArea is the right choice.

However, as an alternative to using CSS for hiding its toolbars, the following will make them disappear as well (Vaadin 7.7.6):

RichTextArea myArea = new RichTextArea();
myArea.setReadOnly(true);
kitekat
  • 181
  • 1
  • 7