PDA

View Full Version : Change background image of read-only textfields



ITS_luka
10 Oct 2011, 7:24 AM
I want to change the background image only for the read-only fields...



TextField<String> tf = new TextField<String>();
tf.setValue("abcde...");
tf.setReadOnly(true);
.....
vp.add(tf); for example....


~o)
help, please :">

catalin.ciobanu
10 Oct 2011, 11:54 PM
1. use firebug and see what css classes establish the current background for a textbox
2. create a css class which fits your needs, set your wanted background image
3. set the new css class using addStyleName to your read-only fields

it should work.