Add setReadOnly() to CopyableLabel

Added setReadOnly() so the TextBox can be made non-editable.

Change-Id: Ic9418e120264352d17e27d0c9a428918b7abc1c1
This commit is contained in:
Michael Zhou
2013-07-14 17:02:25 -07:00
committed by Shawn Pearce
parent 1ee35db3d6
commit ced6c359f5

View File

@@ -178,6 +178,7 @@ public class CopyableLabel extends Composite implements HasText {
textBox = new TextBox();
textBox.setText(getText());
textBox.setVisibleLength(visibleLen);
textBox.setReadOnly(true);
textBox.addKeyPressHandler(new KeyPressHandler() {
@Override
public void onKeyPress(final KeyPressEvent event) {