Setting read-only does not change the appearance of the component

According to https://vaadin.com/wiki/-/wiki/Main/ReadOnly+vs.+Disabled+fields , a read-only field will look different - i.e. a TextField or a ComboBox will look like a Label when the read-only flag is set. However, this doesn’t appear to be the case. I’m using Vaadin 8.1.1 and read-only components look exactly the same, but the content can’t be edited. This can further be confirmed with the Vaadin sampler (e.g. https://demo.vaadin.com/sampler/#ui/data-input/multiple-value/combo-box, clicking on the read-only checkbox in the settings has no effect on how the ComboBox looks)

Does this no longer work in Vaadin 8?

P.S. It appears this is a Valo theme problem. Is there a known workaround?

Hi,

I tested the sampler and when you click the read-only checkbox in the settings the component appearance does change.

Do you still have this issue?

BR,
Goran

Which browser are you using?

I can confirm that the component appearance does change at least on my Windows 7 (tested on Chrome and IE), but it does not change either TextField or ComboBox to look like a Label. It’s a subtle change in background colour that can be easily missed if you haven’t configured the shades. I can’t access the wiki page to check how old the article was, but I assume it was speaking about the Vaadin 6 era themes (Reindeer, Runo, Chameleon). You can check out some options for modifying Valo variables
here
, but if you want the label look you are going to need more custom css.