![]() |
TXNActivate |
||||
Header: | MacTextEditor.h | Carbon status: | Supported | |
Makes the text display area (that is, frame) of a text object active.
OSStatus TXNActivate ( TXNObject iTXNObject, TXNFrameID iTXNFrameID, TXNScrollBarState iActiveState );
A variable of type TXNObject. Pass the text object that identifies the document to be activated.
A variable of type TXNFrameID. Pass the TXNFrameID value that identifies the frame of the document that is to be activated. You obtain a frame ID from TXNNewObject.
A
A result code. TXNActivate returns ParamErr if you pass an invalid text object or frame ID.
You typically call TXNActivate in response to an activate event. If the text object was previously inactive, TXNActivate removes any visual indication (such as a dimmed or framed selection area or inactive scroll bars) of its prior inactive state. Before you call the TXNActivate function, you should make sure that the window belongs to your application.
The TXNActivate function does not itself change the keyboard focus. To change the keyboard focus, you must use the function TXNFocus. Therefore, if you want to display a text area that has both keyboard focus and active scroll bars, you must call the TXNFocus function immediately after calling the TXNActivate function. Finally, note that MLTE does not retain information about keyboard focus. So if, for example, you have set the keyboard focus on a text area and the window containing the text area gets deactivated, when the window is reactivated you must again call the TXNFocus function.
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)