Carbon


TXNClear

Header: MacTextEditor.h Carbon status: Supported

Deletes the current selection.

OSStatus TXNClear (
    TXNObject iTXNObject
);
Parameter descriptions
iTXNObject

A variable of type TXNObject. Pass the text object for the current text area.

function result

A result code. TXNClear also returns ParamErr and Memory Manager errors.

DISCUSSION

To remove a selected object from a text area, a user can either use the Delete key or Clear from the Edit menu. If they select the Clear menu item, you can call the TXNClear function to remove the current selection. Unlike the function TXNCut, note that TXNClear does not add the deleted selection to the private MLTE scrap.

You use this function on selected text. You can use the TXNIsSelectionEmpty function to determine whether the user has selected some text. If the selection is not empty, you need to enable the Cut, Copy, and Clear menu items.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)