TE Edit Control Java / HTML-JavaScript Help
Product page

TerGetMarginEx

Retrieve the margin values for a section in the document.

int TerGetMarginEx(sect,out left,out right,out top,out bottom,out header,out footer)
int sect;The section id to modify. This parameter can assume a value between 0 and 'TotalSects-1'. It can also be set to SECT_CUR to specify the current section.

Upon a successful return from this method, the TerGetOutInt method can be used to retrieve the temporarily saved values for these variables:

int left;

The variable to retrieve the left margin value in twip units. Example:

 left=tej.TerGetOutInt("LeftMargin");
int right;

The variable to retrieve the right margin value in twip units. Example:

 right=tej.TerGetOutInt("RightMargin");
int top;

The variable to retrieve the top margin value in twip units.Example:

 top=tej.TerGetOutInt("TopMargin");
int bottom;

The variable to retrieve the bottom margin value in twip units. Example:

 bottom=tej.TerGetOutInt("BotMargin");
int header;

The variable to retrieve the distance of the header text from the top of the page. Example:

 header=tej.TerGetOutInt("HeaderY");
int footer;

The variable to retrieve the distance of the footer text from the bottom of the page. Example:

 footer=tej.TerGetOutInt("FooterY");

Return Value: This function returns the total number of sections in the document if successful. Otherwise it returns 0.