Instance Method

selectWithFrame:editor:delegate:start:length:

Selects the specified text range in the receiver's field editor.

Declaration

- (void)selectWithFrame:(NSRect)rect editor:(NSText *)textObj delegate:(id)delegate start:(NSInteger)selStart length:(NSInteger)selLength;

Parameters

aRect

The bounding rectangle of the control’s cell.

textObj

The field editor to use.

anObject

The object to use as a delegate for the field editor. This delegate object receives various NSText delegation and notification methods during the course of editing the cell's contents.

selStart

The start of the text selection.

selLength

The length of the text range.

Discussion

This method is similar to editWithFrame:editor:delegate:event:, except that it can be invoked in any situation, not only on a mouse-down event. This method returns without doing anything if textObj or the receiver is nil, or if the receiver has no font set for it.

See Also

Managing the Field Editor

- abortEditing

Terminates the current editing operation and discards any edited text.

- currentEditor

Returns the current field editor for the control.

- validateEditing

Validates changes to any user-typed text.

- editWithFrame:editor:delegate:event:

Begins editing of the receiver’s text using the specified field editor.

- endEditing:

Ends the editing of text in the receiver using the specified field editor.