TE Edit Control .NET Core / .NET Framework Help
Product page

TerCreateParaId

Create a paragraph id.

int TerCreateParaId( ReuseId, shared, LeftIndent, RightIndent, FirstIndent, TabId, StyleId, AuxId, Shading, pflags, SpaceBefore, SpaceAfter, SpaceBetween, flags);
int TerCreateParaIdEx( ReuseId, shared, LeftIndent, RightIndent, FirstIndent, TabId, StyleId, AuxId, Shading, pflags, SpaceBefore, SpaceAfter, SpaceBetween, flags, BltId, BkColor);
int ReuseId;Existing paragraph id to modify with new information. Use -1 to create a new paragraph id.
bool shared;When true, the editor matches the requested specification against the existing paragraph ids. If a matching paragraph id is found, it returns that id. Otherwise it creates a new id. A true value for this field is mutually exclusive with a zero or positive value for the ReuseId field.
int LeftIndent;Left indentation (specified in twips). Use 0 for default.
int RigthIndent;Right indentation (specified in twips). Use 0 for default.
int FirstIndent;Indentation for the first line (specified in twips). Use 0 for default.
int TabId;Tab id. Use 0 for default.
int StyleId;Paragraph Style id. Use 0 for default. When a non-zero style id is specified, other parameters values to the function must be what is indicated by this style id.
int AuxId;An application specified id. The editor does not use this id internally. Use 0 for default.
int shading;Shading amount Specify a value from 0 (no shading) to 10000 (darkest shading).
int pflags; Additional paragraph flags reserved for future use. Use 0 for default.
int SpaceBefore;Space before the paragraph (specified in twips). Use 0 for default.
int SpaceAfter;Space after the paragraph (specified in twips). Use 0 for default.
int SpaceBetween;Space between the paragraph lines (specified in twips). Use 0 for default.
int flags;Paragraph attribute flags. Please refer to the 'SetTerParaFmt' function for a list of paragraph attribute ids. Use 0 for default.

When creating a paragraph id for use inside a page header, the 'flags' parameter must be ORed with the PAGE_HDR constant. Similarly, when creating a paragraph id for use inside a page footer, the 'flags' parameter must be ORed with the PAGE_FTR constant. A paragraph id for use in the regular text must not have either of these constants.

int BltId;The bullet id. When a non-zero bullet id is specified, the BULLET flag must also be specified in the 'flags' parameter. Set to 0 for default.
Color BkColor: Paragraph background color. Set to Hex FFFFFF (white) for default.

Description: This function is used to create a new paragraph id or to modify an exiting id with new paragraph information. To modify an existing id, specify the old paragraph id using the 'ReuseId' argument, otherwise set the 'ReuseId' parameter to -1. When an existing id is modified, this function automatically updates the text which uses this id with new information.

Return Value: When successful, this function returns the id of the new paragraph. Otherwise it returns -1.