TX Text Control ActiveX

Document Editor

Topic

A form with a TXTextControl on it is a word processor: users type, format text, insert tables and images and print, while your code loads and saves documents, reacts to events and adds commands of its own. The pages below cover each of these subjects, from the view modes and file formats to formatting, tables, fields, reviewing, protection, XML documents and printing.

If you haven't placed a TXTextControl on a form yet, start with Creating a Simple Word Processor. It creates the Visual Basic project, connects the button bar, the ruler bars and the status bar to the control and adds the menus that the tutorials here build on.

How the Editor Works

  • One control holds the document. TXTextControl displays and edits a text document. Its view mode decides whether the user sees pages, a continuous text or a plain text box.
  • The bars are separate controls. TXButtonBar, TXRulerBar and TXStatusBar are controls of their own that you connect to the TXTextControl.
  • Built-in dialog boxes need one call. Methods such as FontDialog, ParagraphDialog, TableAttrDialog and ObjectAttrDialog open the dialog boxes of TX Text Control. Built-in Dialog Boxes shows each of them, and the dialog box category of the reference lists their methods.
  • Most pages come with a sample. The Visual Basic tutorials explain sample programs whose source code is installed below Samples\vb6, and the technical articles explain how the properties, methods and events of one subject work together.

Find the Right Page

If you want toRead
Choose between page view, normal view and the other view modesText Formatting and Views
Load and save RTF, HTML, DOC, DOCX and other formatsWorking with Files
Load or insert files that users drop on the controlFile Drag and Drop
Read and write the title, author and keywords of a documentDocument Properties
Add page setup, print, search and color dialog boxesA Word Processor
Insert tables, calculate cells with formulas and format numbersTables
Place images and text frames in a documentUsing Images, Using Text Frames
Add headers and footersHeaders and Footers
Mark text with fields, hypertext links, bookmarks or Word fieldsMarked Text Fields
Open, edit and program XML documentsWorking with XML Files
Print, print page by page or show a print previewPrinting
Format characters and paragraphs, set tabs and paragraph framesCharacter and Paragraph Formatting
Create, change and apply formatting stylesStylesheets
Add bulleted, numbered and structured listsBulleted and Numbered Lists
Divide a document into sections, set page size, margins, columns and page bordersSections and Page Setup
Insert and number footnotesFootnotes
Generate and update a table of contentsTables of Contents
Build forms with text, check box, drop-down and date fieldsForm Fields, Signature Fields
Track, review, accept and reject changes, or comment on textTrack Changes, Comments
Protect a document and mark editable regions for usersDocument Protection
Underline misspelled words and offer correctionsSpell Checking
Select text, use the clipboard, undo and redoSelections, Clipboard and Undo
Connect the button bar, rulers and status barButton Bar, Ruler Bar and Status Bar
Open the dialog boxes built into TXTextControlBuilt-in Dialog Boxes

Where to Start

  1. Work through Creating a Simple Word Processor.
  2. Read Text Formatting and Views for the view modes and the twips that TX Text Control measures in.
  3. Continue with A Word Processor, which adds the dialog boxes of a complete word processor.
  4. Open the page of the feature you are adding.

Pages in This Section