0

I have a problem with LWUIT textfield scroll right issue. I am using it to capture an email from the user and the problem happened when the user enters an email greater than the width of the text field. The text then go down and the user can't see what he write until he finished. I tried setEnableInputScroll to make it scroll right instead of go down but without hope.

enter image description here

    Container username = new Container(new BoxLayout(BoxLayout.X_AXIS));

    Label emailLabel = new Label("E-mail");
    emailLabel.setPreferredW(120);
    emailLabel.getStyle().setAlignment(Label.RIGHT);
    username.addComponent(emailLabel);
    final TextField email = new TextField(userName);

    email.setLabelForComponent(emailLabel);
    email.setPreferredW(170);

    email.setEnableInputScroll(true);

    username.addComponent(email);
    _form.addComponent(username);
Michael Donohue
  • 11,776
  • 5
  • 31
  • 44

1 Answers1

2

use email.setSingleLineTextArea(true) to avoid multiline

Nirmal- thInk beYond
  • 11,847
  • 8
  • 35
  • 46