| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version |
Arguments: text-edit-pane position
Returns the zero-based index of the character at
position in text-edit-pane
if that pixel position is currently scrolled into view, and otherwise
returns nil
. If there is no character at the
specified position (but that position is scrolled into view), then the
index of the nearest character is returned.
text-edit-pane should be a text-edit-pane
or rich-edit-pane
.
position should be a position object (see make-position) in stream coordinates, meaning that it is measured from the upper-left corner of the scrollable contents of the window, and so the value is not affected by the current scroll-position of the window.
(The functionality that is exported by the Windows rich-edit control, which we use for all text-edit-panes in Windows, does not appear to provide a way to determine the character when it is not scrolled into view. There is also no way to programmatically scroll this control to an arbitrary pixel position (in version 1.0), though set-first-visible-line will scroll a particular line of text to the top.)
See also position-of-character-index.
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.
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version |