Reputation: 1873
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:
I do not want the text to get highlighted. Can someone please help me with this. Thanks in advance.
Upvotes: 0
Views: 313
Reputation: 1873
In addition to setting the border i also set the background to the same color as the border and that solved my problem.
Upvotes: 0