0

I have a non editable edit field in my screen. In order to differentiate between editable and non editable field i have set the background of the non-editable field to light gray as in the code below:

  Border nonEditableBorder=BorderFactory.createRoundedBorder(new XYEdges(5, 5, 5, 5),Color.LIGHTGRAY,Border.STYLE_FILLED|Border.STYLE_TRANSPARENT);
  EditField textField=new EditField(EditField.NO_NEWLINE|EditField.FOCUSABLE|DrawStyle.RIGHT);
  textField.setBorder(nonEditableBorder);

Now on the non-editable field when i scroll the trackball to the right or left the text gets highlighted in white as shown in the image below: enter image description here

I do not want the text to get highlighted. Can someone please help me with this. Thanks in advance.

CRUSADER
  • 5,486
  • 3
  • 28
  • 64
S.A.Norton Stanley
  • 1,833
  • 3
  • 23
  • 37

1 Answers1

0

In addition to setting the border i also set the background to the same color as the border and that solved my problem.

S.A.Norton Stanley
  • 1,833
  • 3
  • 23
  • 37