Help with dynamic parts

Hi

Please, I need help, creating a dynamic form with 3 (title header, body and footer) parts on it (sizes: 50, 18, 90). I tried to create the parts in so many different orders and lowerbounds. Right now I think I managed to define the parts at least. But I do not succeed in adding fields to the body. They either show up in the title or the footer or both. But never in the body. This is what I did:

var body = form.newPart(SM_PARTS.BODY, 50);
body.height = 18;
var footer = form.newFooterPart(68);
footer.height = 90;
var header = form.newTitleHeaderPart(0);
header.height = 50;
var field1 = form.newField('col1', SM_DISPLAYTYPE.TEXT_FIELD, 0, 50, 100, 18); // should be in the body part

Q1: Is the order (body, footer, header) really important?
Q2: How do I define a field so it is positioned in the body (top left corner)?

Any help is much appreciated! Kind regards

I think I got it to work, now: I deleted the body part and set the form height to the title header height + body height (= 68px).

Maybe others are interested, too. So I put my code here:

[code]var dataSource = datasetDyn.createDataSource('dataSource' + counter, columnTypes);
var form = solutionModel.newForm(formName, dataSource, 'ourStyle', false , 860, 700);	
form.view = SM_VIEW.LOCKED_TABLE_VIEW;
form.navigator = SM_DEFAULTS.NONE;
form.borderType = SM_DEFAULTS.NONE;
form.scrollbars = SM_SCROLLBAR.SCROLLBARS_WHEN_NEEDED;
form.height = 68;
form.titleText = 'PLANNING';
form.useSeparateFoundSet = true;
form.rowBGColorCalculation = 'highlightSelectedRowAltBG';

var header = form.newTitleHeaderPart(0);
header.height = 50;
var titleLabel = form.newLabel("A Title", 10, 10, 300, 22);
titleLabel.styleClass = 'formtitle';

var footer = form.newFooterPart(68);
footer.height = 158;
var tabPanelFooter = form.newTabPanel('tabFooter', 0, 68, 860, 158);
	
var field1 = form.newField('col1', SM_DISPLAYTYPE.TEXT_FIELD, 0, 50, 100, 18);
field1.styleClass = 'listreadonly';
field1.editable = false;
field1.name = "fldCol1";
field1.anchors = SM_ANCHOR.EAST | SM_ANCHOR.WEST | SM_ANCHOR.NORTH;
field1.titleText = '<html><body>
Person

</body></html>';

// create a form to add to the tab panel
formForTab = ...

// add the form to the tab panel
var tab1 = tabPanelFooter.newTab('tab1', 't1', formForTab);

application.showForm(formName);

Regards

A body part is created by default; the y coordinate of the field will determine which part it belongs to

Thank you. Changing y did not help as long as the parts and there heights were incorrect. I changed y and the field was either in the footer or the header or even both :? .

I hope, a documentation will be available soon.

Regards