The SignInForm UIID was the source of the issue. Thanks. (Not sure why 
taking a screenshot changed the layout though...)
I now have another issue with the simulator.

Here is the source code of my class generated with the GUI builder:

import com.codename1.ui.Form;


public class Launch extends com.codename1.ui.Form  {
public Launch() {
        this(com.codename1.ui.util.Resources.getGlobalResources());
    }
    
    public Launch(com.codename1.ui.util.Resources resourceObjectInstance) {
        initGuiBuilderComponents(resourceObjectInstance);
    }

//-- DON'T EDIT BELOW THIS LINE!!!
    private com.codename1.ui.Button gui_CreateAccountButton = new 
com.codename1.ui.Button();
    private com.codename1.ui.Button gui_SignInButton = new 
com.codename1.ui.Button();
    private com.codename1.components.ScaleImageLabel gui_Logo = new 
com.codename1.components.ScaleImageLabel();


// <editor-fold defaultstate="collapsed" desc="Generated Code">            
              
    private void guiBuilderBindComponentListeners() {
        EventCallbackClass callback = new EventCallbackClass();
        gui_CreateAccountButton.addActionListener(callback);
        gui_SignInButton.addActionListener(callback);
    }

    class EventCallbackClass implements 
com.codename1.ui.events.ActionListener, 
com.codename1.ui.events.DataChangedListener {
        private com.codename1.ui.Component cmp;
        public EventCallbackClass(com.codename1.ui.Component cmp) {
            this.cmp = cmp;
        }

        public EventCallbackClass() {
        }

        public void actionPerformed(com.codename1.ui.events.ActionEvent ev) 
{
            com.codename1.ui.Component sourceComponent = ev.getComponent();

            if(sourceComponent.getParent().getLeadParent() != null && 
(sourceComponent.getParent().getLeadParent() instanceof 
com.codename1.components.MultiButton || 
sourceComponent.getParent().getLeadParent() instanceof 
com.codename1.components.SpanButton)) {
                sourceComponent = 
sourceComponent.getParent().getLeadParent();
            }

            if(sourceComponent == gui_CreateAccountButton) {
                onCreateAccountButtonActionEvent(ev);
            }
            if(sourceComponent == gui_SignInButton) {
                onSignInButtonActionEvent(ev);
            }
        }

        public void dataChanged(int type, int index) {
        }
    }
    private void initGuiBuilderComponents(com.codename1.ui.util.Resources 
resourceObjectInstance) {
        guiBuilderBindComponentListeners();
        setLayout(new com.codename1.ui.layouts.LayeredLayout());
        setInlineStylesTheme(resourceObjectInstance);
        setScrollableY(false);
                setInlineStylesTheme(resourceObjectInstance);
        addComponent(gui_CreateAccountButton);
        addComponent(gui_SignInButton);
        addComponent(gui_Logo);
        gui_CreateAccountButton.setText("Create an account");
                
gui_CreateAccountButton.setInlineStylesTheme(resourceObjectInstance);
        gui_CreateAccountButton.setInlineAllStyles("border:round ffbbbbbb 
rect; fgColor:ffffff; opacity:255; bgImage:; alignment:center; 
padding:2.5mm 2.5mm 2.5mm 2.5mm;");
        gui_CreateAccountButton.setName("CreateAccountButton");
        
gui_CreateAccountButton.setTextPosition(com.codename1.ui.Component.LEFT);
        
((com.codename1.ui.layouts.LayeredLayout)gui_CreateAccountButton.getParent().getLayout()).setInsets(gui_CreateAccountButton,
 
"auto 5.0mm 5.0mm 5.0mm").setReferenceComponents(gui_CreateAccountButton, 
"-1 -1 -1 -1").setReferencePositions(gui_CreateAccountButton, "0.0 0.0 0.0 
0.0");
        gui_SignInButton.setText("Sign in");
                
gui_SignInButton.setInlineStylesTheme(resourceObjectInstance);
        gui_SignInButton.setInlineAllStyles("border:round ff5bc8fb rect; 
fgColor:ffffff; opacity:255; bgImage:; alignment:center; padding:2.5mm 
2.5mm 2.5mm 2.5mm;");
        gui_SignInButton.setName("SignInButton");
        gui_SignInButton.setTextPosition(com.codename1.ui.Component.LEFT);
        
((com.codename1.ui.layouts.LayeredLayout)gui_SignInButton.getParent().getLayout()).setInsets(gui_SignInButton,
 
"auto 5.0mm 3.0mm 5.0mm").setReferenceComponents(gui_SignInButton, "-1 -1 0 
-1").setReferencePositions(gui_SignInButton, "0.0 0.0 1.0 0.0");
        gui_Logo.setPreferredSizeStr("50.0mm inherit");
                gui_Logo.setInlineStylesTheme(resourceObjectInstance);
        gui_Logo.setName("Logo");
        
com.codename1.ui.FontImage.setMaterialIcon(gui_Logo,"\ue3f4".charAt(0));
        
((com.codename1.ui.layouts.LayeredLayout)gui_Logo.getParent().getLayout()).setInsets(gui_Logo,
 
"5.0mm auto 5.0mm auto").setReferenceComponents(gui_Logo, "-1 -1 1 
-1").setReferencePositions(gui_Logo, "0.0 0.0 1.0 0.0");
    }// </editor-fold>

//-- DON'T EDIT ABOVE THIS LINE!!!
 
    public void 
onSignInButtonActionEvent(com.codename1.ui.events.ActionEvent ev) {
    Form loginf = new Login();
    //loginf.getToolbar().setBackCommand("", e -> ((Form) 
ev.getComponent().getParent()).showBack());
    loginf.show();
    }
    
    public void 
onCreateAccountButtonActionEvent(com.codename1.ui.events.ActionEvent ev) {
        Form signf = new Register();
        //signf.getToolbar().setBackCommand("", e -> ((Form) 
ev.getComponent().getParent()).showBack());
        signf.show();
    }
    
    
}

This is how it (correctly) appears in the GUI builder preview:



<https://lh3.googleusercontent.com/-nvAuoPl97Yc/WrVUOeyBXlI/AAAAAAAAAB0/W8RKk3LwLagZKS9fqzFJZtV6iqW9M95qwCLcBGAs/s1600/cn1_simulator_issue3.png>


And here is the result in the simulator:


<https://lh3.googleusercontent.com/-Fk46h3R6qeU/WrVUfNhqRkI/AAAAAAAAAB4/onllm6BOcmMTibXsr4iQRJ8_bOuxl_1wwCLcBGAs/s1600/cn1_simulator_issue4.png>


I really don't undrstand why the simulator do not reflect the specific 
button properties I set in the GUI builder and keep using the default 
flatBlue theme button properties. (yet the code produced by the GUI builder 
seems to correctly override them...)
Also how can I completely remove the title component at the top of the 
form. I don't want any empty blue title bar to appear. I tried to do 
setTitle(null)
setName(null)
in my code so as
setTitle("")
setName("")

but with no effect...

-- 
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/dd1973f4-358d-4fab-b642-53a1b8a16ce1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to