TextEdit

Figure 1. TextEdit

TextEdit is an advanced WYSIWYG viewer and editor supporting rich text formatting with HTML-style tags. It is optimized for handling large documents and responding quickly to user input. TextEdit supports plain text and rich text and can be used as viewer (Read-Only).

TextEdit works with paragraphs and characters. A paragraph is word-wrapped to fit into the width of the textEdit. For plain text, one newline signifies a paragraph. A document consists of no or more paragraphs. Paragraphs are separated by hard line breaks. Each paragraph has its own attributes, for example, font and color.

When using rich text formatting html syntax must be used. e.g.:use "<br/>" instead of "\n" for a new line.

If the text is too large to view within the text edit's viewport, scrollbars will be shown. The format of a textEdit can be changed by using the attribute "textFormat".

By default, the text edit wraps words at whitespace to fit within the text edit. To change the word wrap mode, use the attribute "wordWrap".

When the textEdit is used as an editor, several attributes are available such as font type, color, size or selectText). TextEdit also provides command-based undo and redo functionality.

By default, the text edit operates in insert mode so that all text that you enter is inserted into the text edit and any text to the right of the cursor is moved out of the way. The mode can be changed to overwrite, where new text overwrites any text to the right of the cursor, using "overwriteMode".

See Control/Control Graphics/TextEdit functions for more information on the graphics objects.

To create a textEDIT

  1. Click on the textEdit symbol in the GEDI.

  2. Click in the panel work area. Specify the size.

  3. Open the Property Sheet

  4. Enter the object name (Name).

  5. On the "Extended" tab define the attributes of the textEdit. (see Control/Control Graphics/TextEdit functions).

A double-click on the textEdit in the panel during engineering opens the Clicked script.

The event TextChanged is available for textEdit (on the extended tab of the textEdit). The event is called whenever a user types anything.