Generic FunctionPackage: common-graphicsToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.2
Unrevised from 6.1

set-selection

Arguments: stream start &optional (end start)

Sets the selected text in stream, which must be a text-edit-window, text-edit-pane, a text control (such as an editable-text or multi-line-editable-text), to be the characters indexed by start (inclusive) and end (exclusive). If start equals end, the cursor is placed at before the character at start, but no text is selected. Indexing is zero-based so the first character is index 0. Two invisible characters typically appear at the end of a line.

This function also works on editor buffers (instances of lisp-edit-pane). For a simple test of this function, open an editor window (click View | New Editor if necessary). Click on Tools | Get Component and click on the editor pane. The object will be returned in the Debug Window. In the Debug Window, evaluate

(setq lp *)

Now, in the editor pane, enter

0123456789
0123456789

(with no spaces).

(set-selection lp 0 2) selects 01 in the first line.

(set-selection lp 0 10) selects all characters in the first line.

(set-selection lp 0 13) selects all the first line and 0 in the second

line. (the 11th and 12th characters are the carriage-return and linefeed).

See also get-selection.


Copyright (c) 1998-2002, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 6.2. This page was not revised from the 6.1 page.
Created 2002.2.26.

ToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.2
Unrevised from 6.1