StringBuffer generateLayoutCode() {
		StringBuffer code = new StringBuffer();
		code.append("\t\tStackLayout stackLayout = new StackLayout ();\n");
		if (stackLayout.marginWidth != 0) {
			code.append("\t\tstackLayout.marginWidth = " + stackLayout.marginWidth + ";\n");
		}
		if (stackLayout.marginHeight != 0) {
			code.append("\t\tstackLayout.marginHeight = " + stackLayout.marginHeight + ";\n");
		}
		code.append("\t\tshell.setLayout (stackLayout);\n");
		for(int i = 0; i < children.length; i++) {
			Control control = children[i];
			code.append (getChildCode(control, i));
		}
		if (children.length > 0 && currentLayer != -1) {
			code.append("\n\t\tstackLayout.topControl = " + names[currentLayer] + ";\n");
		}
		return code;
	}