Manually Adding Controls to a Screen

The createControls method allows you to manually add controls to a screen.

The following code adds controls to a layoutManager, which is eventually added to the screen. The layoutManager takes the control, column span, and row span as arguments to add the control and lay it out.

ConfigureControlById configures the controls’s meta data(calling configureObjectMetaDataById) and handlers(calling configureObjectHandlersById) by Ids. A custom subclass can override this method to customize controls.

layoutManager = (LayoutManager) createControlById(LAYOUTMANAGER);
label1 = (Label) createControlById(LABEL1); 
....
configureControlById(LAYOUTMANAGER);
configureControlById(LABEL1);
...
layoutManager.addWidget(label1, 1, 1);
...
this.add(layoutManager);