Re: NSTextView Text Dragging Position
Re: NSTextView Text Dragging Position
- Subject: Re: NSTextView Text Dragging Position
- From: Satoshi Matsumoto <email@hidden>
- Date: Fri, 14 Oct 2005 10:11:03 +0900
on 05.10.14 5:38 AM, Seth Willits at email@hidden wrote:
> Does anyone know how to determine the character positions that text
> was dropped onto an NSTextView? I need to manipulate the string and
> do my own custom insertion but I haven't yet figured out how to find
> the character position to insert the text at.
You can get the dragging location from NSDraggingInfo.
For example,
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
NSPoint draggingLocation = [sender draggingLocation];
draggingLocation = [self convertPoint:draggingLocation fromView:nil];
......
}
Satoshi
-----------------------------------------------------
Satoshi Matsumoto
816-5 Odake, Odawara, Kanagawa, Japan 256-0802
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden