Code and Text Editor
The Code and Text Editor is a word processing utility where you enter, display, and edit code or text. It is referred to as either the Text Editor or the Code Editor, based on its content. If it contains only text without an associated language, it is referred to as the Text Editor. If it contains source code associated with a language, it is referred to as the Code Editor. Because it is most often used for editing code, though, we will refer to it as the Code Editor.
You can open multiple Code Editors to view the code in different forms or modules and copy and paste among them. A list of all open Code Editors is available in the Windows menu.
The Code Editor also supports the language of the project, offering features such as IntelliSense® statement and word completion; early-binding of objects, which provides you with all available properties, methods, and events for that object; and more.
You can open a Code Editor in:
- The Solution Explorer, by selecting a form or module and choosing the View Code button, or by double-clicking the form or module.
- A Form, by right-clicking a control or form and choosing View Code or by choosing Code in the View menu.
- The File menu, by choosing the New or Open commands.
Caution If you share files with users at other sites that use distinct code pages, you should save your file with the appropriate Unicode code page to prevent errors when reading the file. For information about how to do this, see Managing File Storage.
- Code Pane
- The area where you enter your code text. It contains the statement builder features available for your language product.
You can set options that affect the behavior of text in the code pane as it relates to indenting, tabbing, dragging and dropping of text, and so forth. For more information, see General, All Languages, Text Editor, Options Dialog Box.
- Margin Indicator Bar
- A gray area on the left side of the Code Editor where margin indicators such as breakpoints, bookmarks, and shortcuts are displayed. Clicking this area sets a breakpoint on the corresponding line of code.
You can hide or display the Margin Indicator bar in General, Tools, Text Editor, Options dialog box.
- Selection Margin
- A column of white space between the Margin Indicator Bar and the code text where you can click to select lines of text.
You can hide or display the Selection Margin in General, Tools, Text Editor, Options dialog box.
- Horizontal and Vertical Scroll Bars
- Allows you to scroll the Code Pane horizontally and vertically so that you can view the code that extends beyond the viewable edges of the Code Pane.
You can hide or display the horizontal and vertical scroll bars using the General, Tools, Text Editor, Options dialog box.