Issuing a text editing command

The commands provided by the Text Editing framework all take a text selection as the target. Keep in mind that some commands can have a slightly different effect depending on whether the selection is an insertion point or a range.

To issue a text editing command against the current text selection in an editable text document component:

  1. Create the command.
  2. Get the current selection by calling CopyCurrentSelection on the view.
  3. Bind the command to the target selection with a command binding object--for example, TDocumentComponentCommandBindingTo<ATarget>.
  4. Request the document to adopt and execute the command.

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker