Hi,
this works for me:

Form hi = new Form("Tabs", new BorderLayout());
Tabs t = new Tabs();
Label t1 = new Label("Blue");
t1.getAllStyles().setBgColor(0xff);
t1.getAllStyles().setBgTransparency(255);
Label t2 = new Label("Green");
t2.getAllStyles().setBgColor(0xff00);
t2.getAllStyles().setBgTransparency(255);
Label t3 = new Label("Red");
t3.getAllStyles().setBgColor(0xff0000);
t3.getAllStyles().setBgTransparency(255);

t.addTab("Blue", t1);
t.addTab("Green", t2);
t.addTab("Red", t3);

UITimer.timer(500, true, hi, () -> {
    int idx = t.getSelectedIndex() + 1;
    if(idx >= t.getTabCount()) {
        idx = 0;
    }
    t.setSelectedIndex(idx, true);
});

hi.add(CENTER, t);
hi.show();



-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/8deab2f4-44b9-43d3-a84d-683fa0f4771b%40googlegroups.com.

Reply via email to