How to set TextField readonly?

I can disable the TextField, but can't copy any text.
How to set TextField readonly?
 
 
Q