Community
Participate
Working Groups
Take the org.eclipse.ui.forms.examples FormView and make the Text field disabled by adding the lines: text.setText("This is the text for the text field"); text.setEnabled(false); The text is greyed and you cannot edit the text in the text field as expected. However there is a problem that the flat border has been lost.
Which version of 3.0 are you using?
Use 'setEditable(false)' instead.
We are using 3.0 RC2 (200406111814). I will pass on the information, setEditable(false) would seem to do as a workaround.
I still get same bug on 3.1M6. When test.setEnabled(true) is called again, the border is not added either. It takes a reflow() on the form (I found out when expanding a folded section on the same page) to make the borders show again. It would sure be nice to have this fixed, since the editable=false property still makes the control focusable and sets a caret inside it, even though you can't type anything into it.
setEditable is preferred because by moving focus into it, you can get screen readers to read it for you, while disabled controls cannot get focus.