Skip to content

setHidden doesn't work correctly when scrollableX enable #2228

@JrmyDev

Description

@JrmyDev

After 2 hours of debugging, I finally found what cause wrong behavior when hidding a component in my application.

Platform : Simulator
Codename One revisions: 1b2a6d1
Windows 7
Eclipse Neon 4.6.3

I've extract a simple test case. It show a form with two container. The container cnt1 (with label 1) should be hidden, but it's the container cnt2 that is hidden. If you comment cnt1.setScrollableX(true), no problem !

Test case :

Form f = new Form();
Label lbl1 = new Label("Label1");
Label lbl2 = new Label("Label2");
Container cnt1 = FlowLayout.encloseCenter(lbl1);
cnt1.setScrollableX(true);
Container cnt2 = FlowLayout.encloseCenter(lbl2);
f.add(BorderLayout.center(cnt2).add(BorderLayout.SOUTH, cnt1));
cnt1.setHidden(true);
f.show();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions