Form hi = new Form("", new BorderLayout());
        int green = 0x00cc66;
        int yellow = 0xffff00;
        int red = 0xff0000;
        Tabs MpiInspectionForm = new Tabs(Component.TOP);
        Tabs SubSystemTabs = new Tabs(Component.LEFT);
        SubSystemTabs.setTabTextPosition(Tabs.LEFT);
//        SubSystemTabs.setTabUIID("tab");
        MpiInspectionForm.setTabUIID("tab");
        MpiInspectionForm.setTabTextPosition(Tabs.LEFT);
        MpiInspectionForm.addTab("Mpi Sub Systems  
",materialIcon(FontImage.MATERIAL_CHECK_BOX, 4, red), SubSystemTabs);
        Container container2 = new Container(new 
BoxLayout(BoxLayout.Y_AXIS));
        container2.addComponent(getMpiOkSoonNowContainer());
        SpanLabel spl2 = new SpanLabel("Some text directly in the tab 345");
        SubSystemTabs.addTab("Check Fill & Replace  
",materialIcon(FontImage.MATERIAL_CHECK_BOX, 4, green), 
MpiSubSystemsContainer());
        SubSystemTabs.addTab("Common Consumable Items  
",materialIcon(FontImage.MATERIAL_CHECK_BOX, 4, yellow), container2);
        SubSystemTabs.addTab("BRAKING SYSTEM  ", spl2);
        SubSystemTabs.addTab("DRIVE BELTS", new SpanLabel("Some text 
directly in the tab"));
        SubSystemTabs.setTabTitle(SubSystemTabs.getTabTitle(0), 
materialIcon(FontImage.MATERIAL_CHECK_BOX, 4, green), 0);
        SubSystemTabs.setTabSelectedIcon(0, 
materialIcon(FontImage.MATERIAL_CHECK_BOX, 4, green));
        SubSystemTabs.setTabTitle(SubSystemTabs.getTabTitle(1), 
materialIcon(FontImage.MATERIAL_CHECK_BOX, 4, yellow), 1);
        SubSystemTabs.setTabSelectedIcon(1, 
materialIcon(FontImage.MATERIAL_CHECK_BOX, 4, yellow));
        SubSystemTabs.setTabTitle(SubSystemTabs.getTabTitle(2), 
materialIcon(FontImage.MATERIAL_CHECK_BOX, 4, red), 2);
        SubSystemTabs.setTabSelectedIcon(2, 
materialIcon(FontImage.MATERIAL_CHECK_BOX, 4, red));
        SubSystemTabs.setTabTitle(SubSystemTabs.getTabTitle(3), 
materialIcon(FontImage.MATERIAL_CHECK_BOX, 4, green), 3);
        SubSystemTabs.setTabSelectedIcon(3, 
materialIcon(FontImage.MATERIAL_CHECK_BOX, 4, green));
        hi.add(BorderLayout.NORTH, MpiInspectionForm);
        hi.show();

    public static FontImage materialIcon(char charCode, float size, int 
color) {
        Font fnt = Font.createTrueTypeFont("native:MainBold", 
"native:MainBold").derive(CN.convertToPixels(size), Font.STYLE_PLAIN);
        Style s = new Style(color, 0, fnt, (byte) 0);
        FontImage fm = FontImage.createMaterial(charCode, s);
        return fm;
    }
    public Container MpiSubSystemsContainer() {
        Container MpiSubSystemsContainer = new Container(new 
BoxLayout(BoxLayout.Y_AXIS));
        MpiSubSystemsContainer.setScrollableY(true);
        MpiSubSystemsContainer.addComponent(getMpiOkSoonNowContainer());
        return MpiSubSystemsContainer;
    }
    public Component getMpiOkSoonNowContainer() {
        CheckBox button = new CheckBox("Ok");
        button.setUIID("greenHeaderTextArea");
        
        CheckBox button1 = new CheckBox("Soon");
        button1.setSelected(true);
        button1.setUIID("yellowHeaderTextArea");
        CheckBox button2 = new CheckBox("Needed");
        button2.setUIID("redHeaderTextArea");
        Container containerA = new Container(new 
BoxLayout(BoxLayout.Y_AXIS));
        containerA.addComponent(button);
        containerA.addComponent(button1);
        containerA.addComponent(button2);
        return containerA;
    }

Attached is the theme.

Thanks In Advance.
PS. I suspect the solution will solve other coloring issues such as lists 
in a dialog do not color until a pressed event. Very Odd.

Happy Holidays!


On Thursday, December 20, 2018 at 11:34:19 PM UTC-5, Shai Almog wrote:
>
> I meant a small test case for which you can file an issue with embedded 
> code so we can assign and reproduce this. It needs to go into a queue.
>

-- 
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].
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/d5d7882c-0c85-41d7-9075-e772558e3ed0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: theme.res
Description: Binary data

Reply via email to