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. |
InAccess | This property should be set to TRUE when using the control within an Access application. |
TerKey | This 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_CHANGES | Accept all modifications |
ID_ACCEPT_CHANGE | Accept current modification |
ID_AUTO_SPELL | Invoke automatic spell checking. (SpellTime required for this feature) |
ID_BACK_TAB | Enter a reverse tab |
ID_BK_COLOR | Set background color |
ID_BKND_PICT | Set background picture |
ID_BLOCK_COPY | Copy a highlighted block |
ID_BLOCK_MOVE | Move a highlighted block |
ID_BORDER_MARGIN | Toggle border margin around the text box. |
ID_BOLD_ON | Set bold on |
ID_BOX_ON | Enable boxed option |
ID_BULLET | Enable bullet option |
ID_CAPS_ON | All capital letters |
ID_CENTER | Center the paragraph |
ID_CHAR_NORMAL | Reset the character styles |
ID_CHAR_SCALEX | Expand or shrink characters horizontally |
ID_CHAR_SPACE | Character spacing |
ID_CHAR_STYLE | Character style |
ID_COL_BREAK | Insert a column break |
ID_COLOR | Choose colors |
ID_CREATE_FIRST_FTR | Create the first page footer |
ID_CREATE_FIRST_HDR | Create the first page header |
ID_CREATE_LIST | Create a list table item |
ID_CREATE_LIST_OR | Create a list override table item |
ID_COPY | Copy text to clipboard |
ID_CTRL_DOWN | Position at the first column of the next line. |
ID_CTRL_TAB | Enter a tab character within a table |
ID_CTRL_UP | Position at the first column of the previous line. |
ID_CUT | Cut text to clipboard |
ID_DEL | Delete the current character |
ID_DEL_LINE | Delete the current line |
ID_DEL_NEXT_WORD | Delete next word |
ID_DEL_PREV_WORD | Delete the previous word. |
ID_DELETE_FIRST_FTR | Delete the first page footer |
ID_DELETE_FIRST_HDR | Delete the first page header |
ID_DOC_RTL | Set the default right-to-left property for the document |
ID_DOUBLE_SPACE | Double space the paragraph lines |
ID_DOWN | Arrow down |
ID_EDIT_DOB | Edit drawing object |
ID_EDIT_ENOTE | Toggle editing of endnote |
ID_EDIT_FNOTE | Toggle editing of footnote |
ID_EDIT_HDR_FTR | Edit header/footers |
ID_EDIT_INPUT_FIELD | Edit an input field |
ID_EDIT_LIST | Edit the list table items |
ID_EDIT_LIST_OR | Edit the list override table items |
ID_EDIT_LIST_LEVEL | Edit list level properties |
ID_EDIT_OLE | Edit OLE object |
ID_EDIT_PICT | Edit the picture size |
ID_EDIT_STYLE | Edit the style |
ID_EMBED_PICT | Insert embedded picture |
ID_FILE_BEGIN | Position at the beginning of the file |
ID_FILE_END | Position at the end of the file |
ID_FONTS | Choose fonts and point sizes |
ID_FRAME_ROTATE_TEXT | Rotate the frame text |
ID_FRAME_YBASE | Vertical base position |
ID_HANGING_INDENT | Create or increment hanging indentation |
ID_TER_HELP | Show the help window |
ID_HIDDEN_ON | Set the hidden attribute on |
ID_HIDE_CHANGES | Suppress the track-change display effects for text insertion and deletion. |
ID_HILIGHT_LINE | Highlight the line block |
ID_HILIGHT_TEXT | Highlight the selected text. |
ID_HLINK_ON | Set the hyperlink style |
ID_INLINE_IME | Inline Ime |
ID_INS_AFT | Insert a line after the current line |
ID_INS_BEF | Insert a line before the current line |
ID_INSERT | Toggle the insert mode |
ID_INSERT_BOOKMARK | Insert, delete or position at a bookmark |
ID_INSERT_CHECKBOX | Insert a checkbox field |
ID_INSERT_COMBOBOX | Insert a combo-box field. |
ID_INSERT_DATA_FIELD | Insert a data field name and text |
ID_INSERT_DATE_TIME | Insert date/time field. |
ID_INSERT_DRAW_OBJECT | Insert a drawing object |
ID_INSERT_ENOTE | Insert an endnote |
ID_INSERT_FNOTE | Insert a footnote |
ID_INSERT_HLINK | Insert hyperlink |
ID_INSERT_HYPH | Insert an optional hyphen |
ID_INSERT_INPUT_FIELD | Insert an input field |
ID_INSERT_NBDASH | Insert a non-breaking dash character |
ID_INSERT_NBSPACE | Insert a non-breaking spacing character |
ID_INSERT_OBJECT | Insert an OLE object |
ID_INSERT_PAGE_COUNT | Insert the total page count string |
ID_INSERT_PAGE_NUMBER | Insert page number string |
ID_INSERT_PARA_FRAME | Insert a text frame |
ID_INSERT_TOC | Insert table of contents |
ID_ITALIC_ON | Set italic on |
ID_JOIN_LINE | Append the next line to the current line |
ID_JUMP | Jump to a line number |
ID_JUSTIFY | Justify paragraph on both margins |
ID_LEFT | Arrow left |
ID_LEFT_JUSTIFY | Left align the paragraph |
ID_LEFT_INDENT | Create or increment left indentation |
ID_LEFT_INDENT_DEC | Decrement left indentation. |
ID_LINE_BEGIN | Position at the beginning of the line |
ID_LINE_END | Position at the end of the line |
ID_LINK_PICT | Insert link picture |
ID_NEW | Begin a new file |
ID_NEXT_CHANGE | Position at the next modified text string |
ID_NEXT_WORD | Position at the next word |
ID_OPEN | Open an existing file |
ID_PAGE_BREAK | Insert a page break |
ID_PAGE_BREAK_BEFORE | Insert page break before the paragraph |
ID_PAGE_OPTIONS | Set the page options |
ID_PAINT_FORMAT | Paint the current formating to the text selection |
ID_PARA_BK_COLOR | Assign background color to paragraph |
ID_PARA_BORDER | Create paragraph borders and shading |
ID_PARA_KEEP | Paragraph keep together |
ID_PARA_KEEP_NEXT | Paragraph keep with next |
ID_PARA_LIST | Assign list numbering to the paragraph |
ID_PARA_NORMAL | Reset the paragraph attributes |
ID_PARA_NBR | Assign numbering to the paragraph |
ID_PARA_RTL | Set the right-to-left property for the paragraph |
ID_PARA_SPACING | Assign spacing to the paragraph |
ID_PARA_STYLE | Assign style to the paragraph |
ID_PASTE | Paste text from the clipboard |
ID_PASTE_SPEC | Paste special clipboard formats |
ID_PASTE_TEXT | Paste in the plain text format |
ID_PGDN | Page down |
ID_PGUP | Page up |
ID_PICT_FROM_FILE | Import a bitmap from a disk file |
ID_PREV_CHANGE | Position at the previous modified text string |
ID_PREV_WORD | Position at the previous word |
ID_PRINT | Print text |
ID_PRINT_OPTIONS | Set the print parameters |
ID_PRINT_PREVIEW | Print preview |
ID_PROTECT_FORM | Toggle 'form protection' mode. This mode allows the user to input data into the input fields. |
ID_PROTECT_ON | Set character protection on |
ID_PROTECTION_LOCK | Toggle the protection lock for the document |
ID_QUIT | Quit the editing session |
ID_REDO | Reverse the previous undo operation |
ID_REJECT_ALL_CHANGES | Reject all changes |
ID_REJECT_CHANGE | Reject current change |
ID_REPAGINATE | Repaginate now |
ID_REPLACE | Replace text |
ID_RETURN | Process the <Enter> key |
ID_RIGHT | Arrow right |
ID_RIGHT_INDENT | Create or increment right indentation |
ID_RIGHT_JUSTIFY | Right justify the paragraph |
ID_RULER | Toggle ruler display |
ID_SAVE | Save the current file |
ID_SAVEAS | Save data to another file name |
ID_SCAPS_ON | Small capital letters |
ID_SEARCH | Search a text string |
ID_SEARCH_BACK | Search for the previous text string |
ID_SEARCH_FOR | Search for the next text string |
ID_SECT_BREAK | Insert a section break |
ID_SECT_OPTIONS | Set the section parameters |
ID_SECT_RTL | Set the default right-to-left property for the section |
ID_SELECT_ALL | Select the entire document |
ID_SHOW_FIELD_NAMES | Show the field names |
ID_SHOW_HIDDEN | Show the hidden characters |
ID_SHOW_HYPERLINK_CUROSR | Toggle the display of hyperlink cursor |
ID_SHOW_PAGE_BORDER | Show page borders in PageMode |
ID_SHOW_PAGE_LAYOUT | Show page layout in PageMode |
ID_SHOW_PARA_MARK | Toggle the paragraph marker character display |
ID_SNAP_TO_GRID | Snap to grid |
ID_SPELL | |
ID_SPLIT_LINE | Split the current line at the current position |
ID_STATUS_RIBBON | Toggle the status ribbon |
ID_STRIKE_ON | Set strike style on |
ID_SUBSCR_ON | Set subscript on |
ID_SUPSCR_ON | Set superscript on |
ID_TAB | Insert a tab |
ID_TAB_CLEAR | Clear a tab stop position for a paragraph |
ID_TAB_CLEAR_ALL | Clear all tab stop positions for a paragraph |
ID_TAB_SET | Set tab positions for a paragraph |
ID_TABLE_CELL_BORDER | Edit table cell border width |
ID_TABLE_CELL_BORDER_COLOR | Edit table cell border color |
ID_TABLE_CELL_COLOR | Set table cell background color |
ID_TABLE_CELL_SHADE | Set table cell shading |
ID_TABLE_CELL_VALIGN | Set the vertical alignment for the text inside a table cell. |
ID_TABLE_HDR_ROW | Toggle the 'header' attribute of the current table row |
ID_TABLE_INSERT | Insert new table |
ID_TABLE_CELL_WIDTH | Modify table cell width |
ID_TABLE_DEL_CELLS | Delete table cells |
ID_TABLE_INSERT_COL | Insert new table column |
ID_TABLE_INSERT_ROW | Insert new table row |
ID_TABLE_MERGE_CELLS | Merge table cells |
ID_TABLE_ROW_HEIGHT | Position row height |
ID_TABLE_ROW_KEEP | Keep the table row together in one page. |
ID_TABLE_ROW_POS | Position table rows |
ID_TABLE_ROW_RTL | Set the right-to-left property for the table |
ID_TABLE_SEL_COL | select the current table column |
ID_TABLE_SHOW_GRID | Show table grid lines |
ID_TABLE_SPLIT_CELL | Split current table cell horizontally. |
ID_TABLE_SPLIT_CELL_VERT | Split the current table cell vertically. |
ID_TABLE_CELL_VTEXT | Set text rotation for a the table cell text. |
ID_TOOL_BAR | Toggle the toolbar display |
ID_TRACK_CHANGES | Toggle tracking of text modification |
ID_ULINE_ON | Set underline on |
ID_ULINED_ON | Set double underline attribute on |
ID_UNDO | Undo previous edit |
ID_UP | Arrow up |
ID_USER1 to ID_USER9 | Unused 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_FTR | Show page header/footers |
ID_VRULER | Toggle the display of the vertical ruler. |
ID_WATERMARK | Let user select a watermark picture. |
ID_WIDOW_ORPHAN | Enable widow/orphan control for a paragraph. |
ID_ZOOM | Enable 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