LWUIT Blackberry TextField horizontal scroll
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.
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.setPre开发者_运维问答ferredW(170);
email.setEnableInputScroll(true);
username.addComponent(email);
_form.addComponent(username);
use email.setSingleLineTextArea(true)
to avoid multiline
精彩评论