I have an entry dialog that doesn't scroll even though I have set
scrollable Y to true. here is a test case that shows the problem. I have
tried setting scrollableY on both the outer container and the inner
container. NB: I know the form is really tiny, I have done that on
purpose to demonstrate the scrolling issue
protected class DLGTest extends Dialog {
protected Button btnApply = new
Button(FontImage.createMaterial(FontImage.MATERIAL_DONE,
UIManager.getInstance().getComponentStyle("Command"), 5));
protected Button btnClose = new
Button(FontImage.createMaterial(FontImage.MATERIAL_CLEAR,
UIManager.getInstance().getComponentStyle("Command"), 5));
protected TextField tfLine1 = new TextField();
protected TextArea taNotes = new TextArea();
protected CheckBox cbStudy = new CheckBox();
protected TextField tfMaterial = new TextField();
public DLGTest() {
taNotes.setRows(5);
this.setLayout(new BorderLayout());
this.setScrollableY(true);
btnApply.setUIID("Label");
btnClose.setUIID("Label");
btnApply.addActionListener(evt -> dispose());
btnClose.addActionListener(evt -> dispose());
Container cntButtons = new Container(new FlowLayout(RIGHT));
cntButtons.add(btnApply);
cntButtons.add(btnClose);
TableLayout tl = new TableLayout(1,2);
Container cnt2 = new Container(tl);
cnt2.add(tl.createConstraint().horizontalSpan(1).widthPercentage(25),
new Label());
cnt2.add(tl.createConstraint().horizontalSpan(1).widthPercentage(75),
new Label());
cnt2.add(tl.createConstraint().horizontalSpan(1), new Label("Line 1"));
cnt2.add(tl.createConstraint().horizontalSpan(1), tfLine1);
cnt2.add(tl.createConstraint().horizontalSpan(1), new
Label("Material"));
cnt2.add(tl.createConstraint().horizontalSpan(1), tfMaterial);
cnt2.add(tl.createConstraint().horizontalSpan(1), new Label("Study"));
cnt2.add(tl.createConstraint().horizontalSpan(1).horizontalAlign(Component.LEFT),
cbStudy);
cnt2.add(tl.createConstraint().horizontalSpan(1), new Label("Notes"));
Container cnt1 = new Container(new BorderLayout());
cnt1.add(BorderLayout.NORTH, cnt2);
cnt1.add(BorderLayout.CENTER, taNotes);
cnt1.setScrollableY(true);
this.add(BorderLayout.NORTH, cntButtons);
this.add(BorderLayout.CENTER, cnt1);
}
}
new DLGTest().show(20,
(int)(Display.getInstance().getDisplayHeight()*.7)-20, 10, 10, true, true);
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit
https://groups.google.com/d/msgid/codenameone-discussions/edc23f29-1ca2-4c99-bdcc-85daea6ee2cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.