How to put condition in GenericListCellRenderer?

4 views
Skip to first unread message

sanket patel

unread,
Jun 23, 2016, 4:18:02 PM6/23/16
to CodenameOne Discussions
Hi Shai Almog,

How to put condition i below code without data ?? If I want to show/hide some label acording to the input data then how it possible?

private Container createGenericRendererContainer() {
    Container c = new Container(new BorderLayout());
    c.setUIID("ListRenderer");
    Label name = new Label();
    name.setFocusable(true);
    name.setName("Name");
    c.addComponent(BorderLayout.CENTER, name);
    Label surname = new Label();
    surname.setFocusable(true);
    surname.setName("Surname");
    c.addComponent(BorderLayout.SOUTH, surname);
    CheckBox selected = new CheckBox();
    selected.setName("Selected");
    selected.setFocusable(true);
    c.addComponent(BorderLayout.WEST, selected);
    return c;
}


If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA
Desktop OS
Simulator
Device
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages