Tested with 7.0.258. I believe this behavior has changed recently. When editing a right-aligned decimal number, when you start editing the number by clicking in the field, the number jumps to the left side of the field.
If you add a hint like in the code below, it is gets even more confusing because when you start editing the field, the hint stays in the righthand end of field, while the editing cursor is placed in the left side which is easy to miss.
What is expected is the the number is edited on the righthand side of the field.
CSS:
TextField {
text-align: right;
}
Code:
Form form = new Form("Edit number", new BoxLayout(BoxLayout.Y_AXIS));
TextField textField = new TextField("", "0", 10, TextArea.DECIMAL);
textField.setUIID("ScreenItemComment");
textField.setAlignment(TextField.RIGHT);
form.getContentPane().setScrollableY(true );
form.getContentPane().add( new Label("Label"));
form.getContentPane().add( textField);
form.getContentPane().add(new TextArea("another textArea"));
form.show();
Tested with 7.0.258. I believe this behavior has changed recently. When editing a right-aligned decimal number, when you start editing the number by clicking in the field, the number jumps to the left side of the field.
If you add a hint like in the code below, it is gets even more confusing because when you start editing the field, the hint stays in the righthand end of field, while the editing cursor is placed in the left side which is easy to miss.
What is expected is the the number is edited on the righthand side of the field.
CSS:
Code: