TE Edit Control Win32 / Win64 Help
Product page

Properties

This control includes a collection of design-time and run-time properties.

Design-time properties:

Word Wrap:Turn on word wrap.
Print View:Edit document in the Print View mode. In this mode the lines are wrapped as they would be wrapped when printed to the selected printer (see 'Editing Mode' chapter).
Page Mode:Edit document one page at a time. This mode is useful when editing the documents containing multiple columns.
FittedView:Special case of the page mode in which the text wraps to the window width and the soft page breaks are not displayed.
Vertical Scroll:Enable the vertical scroll bar.
Horizontal Scroll:Enable the horizontal scroll bar.
Show Status Bar:Show status bar indicating the cursor position.
Show Ruler:Show the ruler with tab stops and indentation indicators.
Show Toolbar:Enables tool bar.
Border Margin:Reserves a think blank area around the text box.
Read Only:The editor displays the text, but modifications are not allowed.
InAccessThis property should be set to TRUE when using the control within an Access application.
TerKeyThis property provides an alternate method of setting your license key.
Output Rtf:The output is saved in the RTF format. When this option is turned off, the output is saved in the same format as the input buffer (also see SaveFormat property).

Run-time Properties:

Command:

Description: This property is used to invoke the menu commands. The menu is not accessible when the TER editor is used as a control. This property allows you to access the menu commands indirectly.

Usage:

control.Command=Command_id

Example:

TOC1.command = ID_PASTE

The command id can be one of the following:

ID_ACCEPT_ALL_CHANGESAccept all modifications
ID_ACCEPT_CHANGEAccept current modification
ID_AUTO_SPELLInvoke automatic spell checking. (SpellTime required for this feature)
ID_BACK_TABEnter a reverse tab
ID_BK_COLORSet background color
ID_BKND_PICTSet background picture
ID_BLOCK_COPYCopy a highlighted block
ID_BLOCK_MOVEMove a highlighted block
ID_BORDER_MARGINToggle border margin around the text box.
ID_BOLD_ONSet bold on
ID_BOX_ONEnable boxed option
ID_BULLETEnable bullet option
ID_CAPS_ONAll capital letters
ID_CENTERCenter the paragraph
ID_CHAR_NORMALReset the character styles
ID_CHAR_SCALEXExpand or shrink characters horizontally
ID_CHAR_SPACECharacter spacing
ID_CHAR_STYLECharacter style
ID_COL_BREAKInsert a column break
ID_COLORChoose colors
ID_CREATE_FIRST_FTRCreate the first page footer
ID_CREATE_FIRST_HDRCreate the first page header
ID_CREATE_LISTCreate a list table item
ID_CREATE_LIST_ORCreate a list override table item
ID_COPYCopy text to clipboard
ID_CTRL_DOWNPosition at the first column of the next line.
ID_CTRL_TABEnter a tab character within a table
ID_CTRL_UPPosition at the first column of the previous line.
ID_CUTCut text to clipboard
ID_DELDelete the current character
ID_DEL_LINEDelete the current line
ID_DEL_NEXT_WORDDelete next word
ID_DEL_PREV_WORDDelete the previous word.
ID_DELETE_FIRST_FTRDelete the first page footer
ID_DELETE_FIRST_HDRDelete the first page header
ID_DOC_RTLSet the default right-to-left property for the document
ID_DOUBLE_SPACEDouble space the paragraph lines
ID_DOWNArrow down
ID_EDIT_DOBEdit drawing object
ID_EDIT_ENOTEToggle editing of endnote
ID_EDIT_FNOTEToggle editing of footnote
ID_EDIT_HDR_FTREdit header/footers
ID_EDIT_INPUT_FIELDEdit an input field
ID_EDIT_LISTEdit the list table items
ID_EDIT_LIST_OREdit the list override table items
ID_EDIT_LIST_LEVELEdit list level properties
ID_EDIT_OLEEdit OLE object
ID_EDIT_PICTEdit the picture size
ID_EDIT_STYLEEdit the style
ID_EMBED_PICTInsert embedded picture
ID_FILE_BEGINPosition at the beginning of the file
ID_FILE_ENDPosition at the end of the file
ID_FONTSChoose fonts and point sizes
ID_FRAME_ROTATE_TEXTRotate the frame text
ID_FRAME_YBASEVertical base position
ID_HANGING_INDENTCreate or increment hanging indentation
ID_TER_HELPShow the help window
ID_HIDDEN_ONSet the hidden attribute on
ID_HIDE_CHANGESSuppress the track-change display effects for text insertion and deletion.
ID_HILIGHT_LINEHighlight the line block
ID_HILIGHT_TEXTHighlight the selected text.
ID_HLINK_ONSet the hyperlink style
ID_INLINE_IMEInline Ime
ID_INS_AFTInsert a line after the current line
ID_INS_BEFInsert a line before the current line
ID_INSERTToggle the insert mode
ID_INSERT_BOOKMARKInsert, delete or position at a bookmark
ID_INSERT_CHECKBOXInsert a checkbox field
ID_INSERT_COMBOBOXInsert a combo-box field.
ID_INSERT_DATA_FIELDInsert a data field name and text
ID_INSERT_DATE_TIMEInsert date/time field.
ID_INSERT_DRAW_OBJECTInsert a drawing object
ID_INSERT_ENOTEInsert an endnote
ID_INSERT_FNOTEInsert a footnote
ID_INSERT_HLINKInsert hyperlink
ID_INSERT_HYPHInsert an optional hyphen
ID_INSERT_INPUT_FIELDInsert an input field
ID_INSERT_NBDASHInsert a non-breaking dash character
ID_INSERT_NBSPACEInsert a non-breaking spacing character
ID_INSERT_OBJECTInsert an OLE object
ID_INSERT_PAGE_COUNTInsert the total page count string
ID_INSERT_PAGE_NUMBERInsert page number string
ID_INSERT_PARA_FRAMEInsert a text frame
ID_INSERT_TOCInsert table of contents
ID_ITALIC_ONSet italic on
ID_JOIN_LINEAppend the next line to the current line
ID_JUMPJump to a line number
ID_JUSTIFYJustify paragraph on both margins
ID_LEFTArrow left
ID_LEFT_JUSTIFYLeft align the paragraph
ID_LEFT_INDENTCreate or increment left indentation
ID_LEFT_INDENT_DECDecrement left indentation.
ID_LINE_BEGINPosition at the beginning of the line
ID_LINE_ENDPosition at the end of the line
ID_LINK_PICTInsert link picture
ID_NEWBegin a new file
ID_NEXT_CHANGEPosition at the next modified text string
ID_NEXT_WORDPosition at the next word
ID_OPENOpen an existing file
ID_PAGE_BREAKInsert a page break
ID_PAGE_BREAK_BEFOREInsert page break before the paragraph
ID_PAGE_OPTIONSSet the page options
ID_PAINT_FORMATPaint the current formating to the text selection
ID_PARA_BK_COLORAssign background color to paragraph
ID_PARA_BORDERCreate paragraph borders and shading
ID_PARA_KEEPParagraph keep together
ID_PARA_KEEP_NEXTParagraph keep with next
ID_PARA_LISTAssign list numbering to the paragraph
ID_PARA_NORMALReset the paragraph attributes
ID_PARA_NBRAssign numbering to the paragraph
ID_PARA_RTLSet the right-to-left property for the paragraph
ID_PARA_SPACINGAssign spacing to the paragraph
ID_PARA_STYLEAssign style to the paragraph
ID_PASTEPaste text from the clipboard
ID_PASTE_SPECPaste special clipboard formats
ID_PASTE_TEXTPaste in the plain text format
ID_PGDNPage down
ID_PGUPPage up
ID_PICT_FROM_FILEImport a bitmap from a disk file
ID_PREV_CHANGEPosition at the previous modified text string
ID_PREV_WORDPosition at the previous word
ID_PRINTPrint text
ID_PRINT_OPTIONSSet the print parameters
ID_PRINT_PREVIEWPrint preview
ID_PROTECT_FORMToggle 'form protection' mode. This mode allows the user to input data into the input fields.
ID_PROTECT_ONSet character protection on
ID_PROTECTION_LOCKToggle the protection lock for the document
ID_QUITQuit the editing session
ID_REDOReverse the previous undo operation
ID_REJECT_ALL_CHANGESReject all changes
ID_REJECT_CHANGEReject current change
ID_REPAGINATERepaginate now
ID_REPLACEReplace text
ID_RETURNProcess the <Enter> key
ID_RIGHTArrow right
ID_RIGHT_INDENTCreate or increment right indentation
ID_RIGHT_JUSTIFYRight justify the paragraph
ID_RULERToggle ruler display
ID_SAVESave the current file
ID_SAVEASSave data to another file name
ID_SCAPS_ONSmall capital letters
ID_SEARCHSearch a text string
ID_SEARCH_BACKSearch for the previous text string
ID_SEARCH_FORSearch for the next text string
ID_SECT_BREAKInsert a section break
ID_SECT_OPTIONSSet the section parameters
ID_SECT_RTLSet the default right-to-left property for the section
ID_SELECT_ALLSelect the entire document
ID_SHOW_FIELD_NAMESShow the field names
ID_SHOW_HIDDENShow the hidden characters
ID_SHOW_HYPERLINK_CUROSRToggle the display of hyperlink cursor
ID_SHOW_PAGE_BORDERShow page borders in PageMode
ID_SHOW_PAGE_LAYOUTShow page layout in PageMode
ID_SHOW_PARA_MARKToggle the paragraph marker character display
ID_SNAP_TO_GRIDSnap to grid
ID_SPELL
Invoke a spell checking session (SpellTime required for this
feature)
ID_SPLIT_LINESplit the current line at the current position
ID_STATUS_RIBBONToggle the status ribbon
ID_STRIKE_ONSet strike style on
ID_SUBSCR_ONSet subscript on
ID_SUPSCR_ONSet superscript on
ID_TABInsert a tab
ID_TAB_CLEARClear a tab stop position for a paragraph
ID_TAB_CLEAR_ALLClear all tab stop positions for a paragraph
ID_TAB_SETSet tab positions for a paragraph
ID_TABLE_CELL_BORDEREdit table cell border width
ID_TABLE_CELL_BORDER_COLOREdit table cell border color
ID_TABLE_CELL_COLORSet table cell background color
ID_TABLE_CELL_SHADESet table cell shading
ID_TABLE_CELL_VALIGNSet the vertical alignment for the text inside a table cell.
ID_TABLE_HDR_ROWToggle the 'header' attribute of the current table row
ID_TABLE_INSERTInsert new table
ID_TABLE_CELL_WIDTHModify table cell width
ID_TABLE_DEL_CELLSDelete table cells
ID_TABLE_INSERT_COLInsert new table column
ID_TABLE_INSERT_ROWInsert new table row
ID_TABLE_MERGE_CELLSMerge table cells
ID_TABLE_ROW_HEIGHTPosition row height
ID_TABLE_ROW_KEEPKeep the table row together in one page.
ID_TABLE_ROW_POSPosition table rows
ID_TABLE_ROW_RTLSet the right-to-left property for the table
ID_TABLE_SEL_COLselect the current table column
ID_TABLE_SHOW_GRIDShow table grid lines
ID_TABLE_SPLIT_CELLSplit current table cell horizontally.
ID_TABLE_SPLIT_CELL_VERTSplit the current table cell vertically.
ID_TABLE_CELL_VTEXTSet text rotation for a the table cell text.
ID_TOOL_BARToggle the toolbar display
ID_TRACK_CHANGESToggle tracking of text modification
ID_ULINE_ONSet underline on
ID_ULINED_ONSet double underline attribute on
ID_UNDOUndo previous edit
ID_UPArrow up
ID_USER1 to ID_USER9Unused command ids to be used with new toolbar icons. It is generally used to implement functionality not provided by the existing command ids. For example, you can use ID_USER1 to implement PDF output icon. You would intercept ID_USER1 using the PreProcess event and execute your code there. Then call the TerIgnoreCommand method to tell the editor to ignore this command.
ID_VIEW_HDR_FTRShow page header/footers
ID_VRULERToggle the display of the vertical ruler.
ID_WATERMARKLet user select a watermark picture.
ID_WIDOW_ORPHANEnable widow/orphan control for a paragraph.
ID_ZOOMEnable Zoom

Data:

Description: Use this property to assign or retrieve text from the control. Usage:

control.Data = string or

string = control.Data

Example:

control.Data = "This is a test data"

See Also: SaveFormat

hWnd:

Description: This property is used to access the window handle of the control. The window handle is generally the first required argument when calling a DLL function.

Example: TerSetReadOnly(control.hWnd,TRUE)

ParaIndentHanging:

Description: This property is used to increase (True) or decrease (False) the left hanging indentation for a paragraph. Each increment or decrement is equal to a 1/4 of an inch. The hanging indent is not applied to the first line of a paragraph.

Usage:control. ParaIndentHanging=True|False

ParaIndentLeft:

Description: This propery is used to increase (True) or decrease (False) the left indentation for a paragraph. Each increment or decrement is equal to a 1/4 of an inch.

Usage: control.ParaIndentLeft=True|False

ParaIndentRight:

Description: This property is used to increase (True) or decrease (False) the right indentation for a paragraph. Each increment or decrement is equal to a 1/4 of an inch.

Usage: control.ParaIndentRight=True|False

ParaReset:

Description: This function is used to reset all attributes for the current paragraph.

Usage: control.ParaReset=True

ParaStyle:

Description: This function is used to set the centering, right justification, and double space attributes for a paragraph:

LEFT: Paragraph left justified
CENTER: Paragraph centered
RIGHT_JUSTIFY: Paragraph right justified
JUSTIFY: Paragraph justified on both margins
DOUBLE_SPACE: Paragraph lines double spaced.
PARA_KEEP: Paragraph keep together
PARA_KEEP_NEXT: Paragraph keep with next

A justification flag can be specified along with the double space attribute by using the 'or' operator.

Usage:control.ParaStyle = style

Example:

control.ParaStyle = CENTER or DOUBLE_SPACE.

ReadFile:

Description: Use this property to load a specified file in the control.

Usage: control.ReadFile = filename

Example: control.ReadFile = "test.doc"

See Also: SaveFile

Repaint:

Description: When this property is set to False, the screen refresh is suspended for the subsequent calls to other properties.

Usage: control.Repaint=True | False

ResetCharStyle:

Description: This property is used to reset character styles such as bold, underline, italic, etc.. More than one style can be reset by using the 'or' operator.

If a text block is highlighted prior to setting this property, the entire text block is subject to this command. Otherwise, the specified style is reset for new text input.

Usage: control.ResetCharStyle=constant

The following constants are available:

BOLD: Bold
ULINE: Underline
ULINED: Double underline
ITALIC: Italic
STRIKE: Strikethrough
SUPSCR: Superscript
SUBSCR: Subscript
HIDDEN: Hidden text
CAPS: All caps
SCAPS: Small caps

Example:

control.ResetCharStyle=BOLD or ULINE.

See Also: SetCharStyle

SaveFile:

Description: Use this property to save the contents of the control to a disk file. Any previous content of the file is destroyed.

Usage: control.SaveFile = filename

Example:

control.SaveFile = "test.doc"

See Also: ReadFile

SaveFormat:

Description: This property controls the format of the data when it is retrieved from the control. This property is typically set before invoking the 'Data' property.

Usage: control.SaveFormat=format

The 'format' can be one of the following:

SAVE_TER: Save in the control's native format.
SAVE_TEXT: Save in the text format. The formatting
information is lost in the text format.
SAVE_TEXT_LINES:Save in the text format with line breaks.
The formatting information is lost in
this format.
SAVE_RTF: Save in the Rich Text Format.
SAVE_DOCX: Save in the DOCX format.
SAVE_UTEXT: Save in the Unicode text format.
SAVE_DEFAULT: Save in the format of the input data.

Example:

control.SaveFormat=SAVE_TER

string=control.Data

See Also: Data

SetCharStyle:

Description: This property is used to set character styles such as bold, underline, italic, etc.. More than one style can be specified by using the 'or' operator.

If a text block is highlighted prior to setting this property, the entire text block is assigned the character style. Otherwise, the specified style is assigned to new text input.

Usage: control.SetCharStyle=constant

Please refer to the ResetCharStyle property for the available style constants.

Example: control.SetCharStyle=BOLD or ULINE.

See Also: ResetCharStyle