开发者

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.

LWUIT Blackberry TextField horizontal scroll

    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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜