TX Text Control .NET for Windows Forms

Document Editor

Topic

A Windows Forms application with a TextControl on its form is a word processor: users type, format, insert tables and images, review changes and print, while your code loads documents, reacts to events and adds commands of its own. The pages below take each of these subjects further than the first tutorials, from the life of the control on a form to the ribbon, the dialog boxes and the events around it.

If you haven't placed an editor on a form yet, start with the tutorials of Document Editor in Getting Started. They create the project, add the control from the Toolbox, connect a ribbon or a button bar and build the file commands that every page here assumes.

TX Text Control Words, the sample word processor, with its ribbon, the Form Fields tab selected, a horizontal and a vertical ruler, a form with a drop-down list in the document and a status bar.

How the Editor Works

  • One control holds the document. TextControl is a Windows Forms control that you drag from the Toolbox onto a form. Its document consists of the main text, text frames, headers, footers and footnotes.
  • Users need no code. Typing, selecting, the clipboard keys, undo and the context menus work as soon as the control has the focus.
  • Your code shares the object model. Selection and collections such as Tables and Sections also belong to ServerTextControl, which Document Processing uses without a user interface.
  • The interface around it is made of controls. A Ribbon or a button bar, rulers, a status bar and sidebars are separate controls that you connect to the TextControl through properties, in the designer or in code.

Find the Right Page

If you want toRead
Know when the control is ready and where startup code goesArchitecture and Control Lifecycle
Work with the selection, the clipboard, undo or searchEditing Text
Format text and paragraphsText and Paragraph Formatting
Add tables, images, frames, charts or barcodesTables and Table Formulas and the pages after it
Build forms that users fill outForm Fields and Conditional Instructions
Let several people review a documentTrack Changes, Comments
Change the ribbon, toolbars, sidebars or dialog boxesRibbon and UI

Where to Start

  1. Work through Create Your First Windows Forms Application and Create a Ribbon Application with Sidebar Support.
  2. Read Architecture and Control Lifecycle, so that your code runs at the right moment and on the right text part.
  3. Open the page of the feature you are adding.
  4. Compare your form with the TX Words Sample Application, which combines most features of this section.

Pages in This Section