Re: Get current caret position
Re: Get current caret position
- Subject: Re: Get current caret position
- From: eveningnick eveningnick <email@hidden>
- Date: Tue, 16 Nov 2010 16:18:38 +0200
> The text caret doesn't have a single, global position. It is really the position of the text selection within an active text view when the selection length is zero. If you want to know which logical characters the insertion point is at in a given text view, that's easy to find - just get the selection range and the location field is the position of interest. The text system has methods to convert the logical character position to a view position and from there to a screen position, but why do you want that? In other words, what are you really trying to do?
>
Hello, Graham
Basically i want to get the text caret position in Word 2011 active
document window. I want to place a popup window on that location.
Microsoft Word 2011 SDK is not available to public (i am not even sure
if this SDK includes such a GetCaretPosition() function, most likely
that the answer is No).
Thus i was thinking that as long as Word 2011 is a cocoa application,
its document is most likely something like a modified text field (not
sure though) and i could get that position (at least, relatively to
the main window's pos).
(there's a built in Visual Basic function called "Get text selection
position relatively to page", but that there is no way to determine
that page's location)
Would that be possible to achive using cocoa framework's means?
Thanks,
George
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden