Control Properties
This control includes a collection of design-time and run-time properties.
Design-time properties:
These properties must be set before the control window is created.
| Word Wrap: | Turn on word wrap. (Default: True) |
| 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). (Default: True) |
| Page Mode: | Edit document one page at a time. This mode is useful when editing the documents containing multiple columns. (Default: True) |
| FittedView: | Special case of the page mode in which the text wraps to the window width and the soft page breaks are not displayed. (Default: False) |
| Vertical Scroll: | Enable the vertical scroll bar. (Default: True) |
| Horizontal Scroll: | Enable the horizontal scroll bar. (Default: False) |
| Show Status Bar: | Show status bar indicating the cursor position. (Default: False) |
| Show Ruler: | Show the ruler with tab stops and indentation indicators. (Default: False) |
| Show Toolbar: | Enables tool bar. (Default: False) |
| Border Margin: | Reserves a think blank area around the text box. (Default: True) |
| Read Only: | The editor displays the text, but modifications are not allowed. |
| 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). (Default: False) |
| TernKey | The Tern license key. Your license key is e-mailed to you after your order is processed. |
| HtmlAddOnKey | HTML Add-on license key if HTML Add-on is installed. Your license key for HTML Add-on is e-mailed to you after your order for HTML Add-on is processed. |
| SpellTimeKey | SpellTime license key if SpellTime is installed. Your license key for SpellTime is e-mailed to you after your order for SpellTIme is processed. |
| DictPath | The directory where the SpellTime dictionary files are copied. |
| UseWindow | Set this property to False (window-less operation) when using the control within an ASP.NET server application. (Default: True) |
| InServer | Hosted in a server application (Default: False). Set this property to True when using the control within an ASP.NET server application. |
Run-time Properties:
These properties are meant to be set after the control window is created.
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_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 | Apply text highlighting |
| 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_COMBBOX | 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_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 |
| 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_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_PAINT_FORMAT | Apply the current formatting to the selected text |
| 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 |
| 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 the '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 | Invoke a spell checking session (SpellTime required for this feature) |
| 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_CELL_VTEXT | Set text rotation for a table cell text. |
| 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 current table cell vertically. |
| 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 vertical ruler |
| ID_WATERMARK | Let the 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"
The data property supports RTF, DOCX, HTML (HTML Add-on must be installed), and various text formats. You can select a particular format by call the TerSetOutputFormat method before using the Data property.
DocxData:
Description: Use this property to assign or retrieve text in the DOCX format from the control. Usage:
control.Data = docx or
bytes[] docx = control.Data
Example:
byte[] docx=MyDocxData
control.Data = docx