TE Edit Control Java / HTML-JavaScript Help
Product page

TerGetParaInfo

Get paragraph attributes.

boolean TerGetParaInfo( LineNo) 
boolean TerGetParaInfo3( LineNo, IsStyleItem)
int LineNo;Line number to retrieve the paragraph information. To specify a para id instead of a line number, specify a negative value.
boolean IsStyleItem;This parameter is applicable to the TerGetParaInfo3 function only. It allows you to retrieve the paragraph information for a style item. When this flag is set to true, the LineNo parameter should be used to pass a style id to retrieve its information. You can also set the LineNo to SID_CUR to get the paragraph information about the style being currently edited.

Upon a successful return from this method, the following information can be retrieved by using TerGetOutInt, TerGetOutColor, or TerGetOutStirng methods:

int LeftIndent;

Left indentation (in twips). Example:

LeftIndent=tej.TerGetOutInt("LeftIndent")
int RigthIndent;

Right indentation (in twips). Example:

RightIndent=tej.TerGetOutInt("RightIndent")
int FirstIndent;

Indentation for the first line (in twips). Example:

FirstIndent=tej.TerGetOutInt("FirstIndent")
int TabId;

Tab id. Example:

TabId=tej.TerGetOutInt("TabId")	
int StyleId;

Paragraph Style id. Example:

StyId=tej.TerGetOutInt("StyId")
int AuxId;

An application specified id. Example:

AuxId=tej.TerGetOutInt("AuxId")
int shading;

Shading amount: a value from 0 (no shading) to 10000 (darkest shading). Example:

shading=tej.TerGetOutInt("Shading")
int pflags;Additional paragraph flags:
PFLAG_WIDOW: Widow/orphan control
PFLAG_PAGE_BREAK: Page break before the paragraph

Example:

pflags=tej.TerGetOutInt("pflags")
int SpaceBefore;

Space before the paragraph (in twips). Example:

SpaceBefore=tej.TerGetOutInt("SpaceBefore")
int SpaceAfter;

Space after the paragraph (in twips). Example:

SpaceAfter=tej.TerGetOutInt("SpaceAfter")
int SpaceBetween;

Space between the paragraph lines (in twips). Example:

SpaceBetween=tej.TerGetOutInt("SpaceBetween")
int flags;

Paragraph attribute flags. Please refer to the 'SetTerParaFmt' function for a list of paragraph attribute ids. Example:

flags=tej.TerGetOutInt("Flags")

int Aux1Id;

Another application specified id. Example:

Aux1Id=tej.TerGetOutInt("Aux1Id")
Color BkColor;

Paragraph background color. Example:

Color BkColor=tej.TerGetOutInt("BkColor")

or,

String HtmlColor = tej.TerGetOutStr("BkColor");
int LineSpacing;

Extra line spacing in percentage. Example:

LineSpacing=tej.TerGetOutInt("LineSpacing")

Return Value:  This function returns a true value when successful.  Otherwise it returns false.