Udostępnij za pośrednictwem


Code and Text Editor

The Code and Text editor is the word processor of the integrated development environment (IDE). When it is used to edit text, it is referred to as the Text Editor. When used to edit source code in a Visual Studio development language, its most common use, it is referred to 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. There are various ways to open the Code Editor:

To open the Code Editor from

Do this

Solution Explorer

Select a form or module and click the View Code toolbar button, or double-click the form or module.

Windows form or Web form

Select the form or any of its controls and choose Code on the View menu, or right-click and choose View Code from the shortcut menu.

File menu

Choose New or Open to display a code file.

A list of all documents opened for editing in instances of the Code Editor is available in the Windows menu. The HTML Designer, CSS Editor, and XML Editor features of the IDE also employ this editor.

The Code Editor for the language in which you are developing offers such rich features as:

  • Access to object properties, methods, and events at design time.

  • IntelliSense statement completion.

  • Collapsible code sections.

  • A Code Definition Window that displays the source code for an object or element.

  • A Code Snippet Inserter that lets you add ready-made blocks of model code.

  • Options to define indents, tabs, and drag-and-drop behavior.

  • Unicode code pages.

  • Emulations of the Emacs and Brief editors.

UE Element List

  • Code Pane
    The area where code or text is displayed for editing. It provides IntelliSense® statement completion for the language in which you are developing. For more information, see Using IntelliSense.

  • Indicator Margin
    A gray column on the left side of the Code Editor where indicators such as breakpoints, bookmarks, and shortcuts are displayed. Clicking this area sets a breakpoint on the corresponding line of code.

  • Selection Margin
    A column between the Indicator Margin and the editing window where you can click to select lines of code. Changes to code are tracked here when you select the Track Changes option in the General, 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.

In This Section

See Also

Tasks

How to: Outline and Hide Code

How to: Create Task List Comments

How to: Debug Code in the Editor

How to: Manage File Storage

Reference

Solution Explorer