Using the Text Editor
You use the Text Editor window to write, display, and edit code, script, and HTML or text documents. You can open multiple Text Editor windows, so you can easily view the code in different modules, and copy and paste between them. All open Text Editor windows are listed in the Window list, available from the Windows menu.
To open a Text Editor window
Select a code module or document in the Project Explorer window, and choose the View Code toolbar button.
-or-
Select a code module or document in the Project Explorer window, and choose Code from the View menu.
Text Editor Features
The Text Editor has several features to simplify the process of writing and editing code. The features that are available to you may vary depending on the language engine and the Text Editor option settings.
Drag and Drop
You can drag a selected text or block of code in order to move, copy, or delete it. You can also drag certain code elements such as variables or statements in order to debug them.
To move text
- Select the desired text and drag it to a new location in the current Text Editor window, or to another Text Editor window.
To copy text
- Select the desired text and, while holding the CTRL key, drag it to a new location in the current Text Editor window, or to another Text Editor window.
To delete text
- Select the desired text and drag it to the Recycle Bin.
To debug a variable or statement
- Select a variable or statement and drag it to the Watch window or the Immediate window.
Statement Builder
The Statement Builder provides you with assistance while writing your code. The Statement Builder options available may vary depending on the language engine you are using or on the settings of the Text Editor options. Check the documentation for your specific language.
Member List
The Member list is a drop-down listbox that contains the properties and methods available for a selected object. As you type an object name using the object.member syntax, the list will appear after you type the period.
To select a member, type the first letter or letters of the member name until the desired member is highlighted. You can also navigate through the list using the Up, Down, PageUp, PageDown, Ctrl+PageUp, or Ctrl+PgDown keys.
Once the desired member is selected, pressing any delimiter key will commit the current item and insert it in your code. The delimiter keystroke is also inserted following the member, as shown:
Delimiter Key | Result |
Tab | Commits the selected member. The insertion point is located immediately behind member. |
Space | Commits the selected member followed by a space. |
Enter | Commits the selected member and places the insertion point at the beginning of a new line. |
Comma | Commits the selected member followed by a comma. |
If no member is highlighted, Tab or Ctrl+Enter commit the current item in the list.
Complete word
Fills in the rest of the word you are typing once you have entered enough characters for the editor to identify the word you want.
Parameter Information
Provides information about the parameters of the initial function or statement. If you have a function or statement that contains function calls as its parameters, choosing Parameter Info provides information about the first function. Quick Info provides information about each embedded function.
While the Parameter Info window is visible, typing a comma (,) causes the next parameter to be displayed in bold.
The Parameter Info, once activated, will not close until:
all of the required parameters are entered.
the function is ended without using all of the optional parameters.
you press ESC.
List constants
Displays a dropdown list of constants for a property or parameter. After you type the name of a property or a parameter, the list drops down showing any available constants.