TE Edit Control Java / HTML-JavaScript Help
Product page

TerGetLineInfo

Get the current line attributes.

boolean TerGetLineInfo(LineNo);
int LineNo;Line number to retrieve the information. Set to -1 to use the current line number.

The following information can be retrieved by using the TerGetOutInt method after a successful return from this method.

int ParaId;

The paragraph id. Retrieve as following:

if  (TerGetLineInfo(LineNo)) {
  ParaId = TerGetOutInt("ParaId");
}
int CellId;

The table cell id. Retrieve as following:

if  (TerGetLineInfo(LineNo)) {
  CellId = TerGetOutInt("CellId");
}
int ParaFID;

The paragraph frame id. Retrieve as following:

if  (TerGetLineInfo(LineNo)) {
  ParaFID = TerGetOutInt("ParaFID");

}

int x;

The x position (in twips) of the line. Retrieve as following:

if  (TerGetLineInfo(LineNo)) {
  x = TerGetOutInt("x");

}

int y;

The y position (in twips) of the line relative to the top of the page. Retrieve as following:

if  (TerGetLineInfo(LineNo)) {
  y = TerGetOutInt("y");

}

int height;

The height (in twips) of the line.

Retrieve as following:

if  (TerGetLineInfo(LineNo)) {
  height = TerGetOutInt("height");

}

int lflags;

Line flags as defined by the LFLAG_ constants:

tej.LFLAG_PARA  : paragraph or cell break
                 line
tej.LFLAG_BREAK : any other break line
tej.LFLAG_PARA_FIRST : first para line
tej.LFLAG_CONTROL : line has embedded
                   control
tej.LFLAG_FNOTE   : contains a footnote
tej.LFLAG_SOFT_COL: soft column break
tej.LFLAG_NBSPACE : line has non-break
                   space characters
tej.LFLAG_LINE    : line break
tej.LFLAG_HTML_RULE: is html horizontal
                    rule
tej.LFLAG_BOX_TOP  : draw top para border
                    before this line
tej.LFLAG_BOX_BOT  : draw bot para border
                    before this line
tej.LFLAG_SECT     : section break line
tej.LFLAG_FRAME_TOP: first line of a
                    screen frame
tej.LFLAG_NBDASH   : line has non-break
                    dash characters
tej.LFLAG_PICT     : line contains an
                    aligned picture
tej.LFLAG_PICT_SPACE: contains a picture
                     frame on the left
                     or the right side
tej.LFLAG_FNOTETEXT : contains a footnote
                     text
tej.LFLAG_FHDR      : first page hdr
tej.LFLAG_FFTR      : first page ftr
tej.LFLAG_HDR       : regular page hdr
tej.LFLAG_FTR       : regular page ftr
tej.LFLAG_HYPH      : contains optional
                     hyphenation.
tej.LFLAG_SHADE_BEGIN: shading begins at
                      this line
tej.LFLAG_SHADE_END : shading ends at
                     this line
tej.LFLAG_TOC       : has table of
                     contents
tej.LFLAG_LIST      : line contains the
                     list number to
                     display
tej.LFLAG_HPARA     : line contains a
                     hidden para marker
tej.LFLAG_LISTNUM   : has list number
                     field in it
tej.LFLAG_SELECTED  : result of
                     LineSelected
                     function
tej.LFLAG_ASSUMED_TAB:this cell line
                     assumes a decimal
                     tab in the
                     beginning of the
                     line
tej.LFLAG_AUTONUMLGL: has an autonumlgl
                     field in the line

Retrieve as following:

if  (TerGetLineInfo(LineNo)) {
  lflags = TerGetOutInt("lflags");
}
int InfoFlags;

Miscellaneous flags as defined by the INFO_ constants:

tej.INFO_TAB        = has TAB
tej.INFO_SECT       = has section break
tej.INFO_PAGE       = has page break
tej.INFO_COL        = has column break
tej.INFO_CELL       = has cell break
tej.INFO_ROW        = has row break
tej.INFO_TABLE      = has table
tej.INFO_JUST       = justified text
tej.INFO_FRAME      = displaced by a frame
tej.INFO_SPACE_LINE = is frame space
tej.INFO_PAGE_NUMBER= has page number
tej.INFO_FRM_SPC_BEF= has space before
                     frame
tej.INFO_DYN_FIELD  = has dynamic field

Retrieve as following:

if  (TerGetLineInfo(LineNo)) {
  InfoFlags = TerGetOutInt("InfoFlags");
}

Description: The x, y, and the height values are available in the Page Mode only.

Return Value: This function returns a true value when successful. Otherwise it returns false. The TerGetOutInt parameter can be used to retrieve various bit of information after a successful return from this method:

if  (TerGetLineInfo(LineNo)) {
  CellId = TerGetOutInt("CellId");
  ParaId = TerGetOutInt("ParaId");

}