Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version

get-selection

Arguments: stream

This function returns two numeric values indicating the start and end positions of the currently selected text of the control identified by stream, which must be a text control of some sort or a text-edit-window or text-edit-pane.

If there is no text selected, then the two returned values are equal and indicate the current text cursor position; zero indicates the beginning of the text.

See also set-selection, selected-object, selected-string, and selected-symbol. Those functions may return true when no text is highlighted (they can return the text surrounding the text cursor as well as highlighted text). Menu command such as Cut only work on highlighted text, while, in the IDE, others, such as Copy, work on the text surrounded the cursor if no text is highlighted (the IDE differs from Common Windows practice in this regard). get-selection can be used, either alone or in conjunction with those functions, to determine whether menu-items that work on selected or highlighted text should be made unavailable. See about-to-show-menu, which is called prior to a menu being displayed.


Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version