Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting text caret location in screen coordinate




On Apr 11, 2006, at 8:53 PM, Chen Wang wrote:

I'm trying to make a small window that is able to dynamically follow the text caret (the little "I" shaped cursor) while typing. In most cases, the text caret is owned by other application. Therefore, I'm looking for a solution which is able to tell where (x, y) is the text caret system wide. After spending hours on searching, it seems to me that there is no straight-forward way to do it (like locating the mouse cursor by using GetGlobalMouse() or [NSEvent mouseLocation]). Any suggestion or point to right docs will be highly appreciated.


This is the sort of thing that an input method would do; try looking at the documentation for input methods, e.g. the TSM reference material. There probably are examples available too.


The alternative would be to use the accessibility APIs.

Douglas Davidson

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Getting text caret location in screen coordinate (From: "Chen Wang" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.