CharToPoint
protoTXView:CharToPoint(offset)
Returns a frame that specifies the coordinates of a character in a word-processing view.
DISCUSSION
- offset
- The offset from the beginning of the text in the word-processing view. This offset specifies the caret location: a value of 0 indicates before the first character, and a value of 1 indicates between the first and second characters.
- return value
- The *
CharToPoint
method returns a frame with three slots:
x
The horizontal coordinate of the top-left corner of the rectangle enclosing the character at offset.
y
The vertical coordinate of the top-left corner of the rectangle enclosing the character at offset.lineHeight The line height of the line that contains the character.
The value of each of the slots in the returned frame is in global coordinates, relative to the top-left of the screen. This means that the y-value can be negative if the view has been scrolled down.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help