Re: How to: continue tracking mouse-drag event even after cursor moves out of the movie....
Re: How to: continue tracking mouse-drag event even after cursor moves out of the movie....
- Subject: Re: How to: continue tracking mouse-drag event even after cursor moves out of the movie....
- From: rajesh <email@hidden>
- Date: Fri, 17 Apr 2009 16:47:57 +0200
Child views being dynamically created and placed in the parent view ,
so I tried this in my child view's subclass
-(id)initWithFrame:(NSRect)frame{
self = [super initWithFrame:frame]; //NSView
if (self) {
NSSize frameSize = [NSScrollView frameSizeForContentSize:frame.size
hasHorizontalScroller:YES
hasVerticalScroller:YES borderType:NSLineBorder];
NSRect scrollFrame = frame;
scrollFrame.size = frameSize;
NSScrollView *scrollers = [[NSScrollView alloc]
initWithFrame:scrollFrame];
[scrollers setAutoresizingMask:NSViewWidthSizable |
NSViewHeightSizable];
[scrollers setDocumentView:self];
}
return self;
}
but that didn't rescue me....
am I missing anything ?
should I be placing NSScrollView in the parent view ? I think its no
different then what I am doing by above code
Thanks
Rajesh
Begin forwarded message:
From: rajesh <email@hidden>
Date: April 17, 2009 4:02:16 PM GMT+02:00
To: cocoa-dev Dev <email@hidden>
Subject: How to: continue tracking mouse-drag event even after
cursor moves out of the movie....
Hi All,
I have two views aligned side by side in parent view (All being
NSView's )
I am overriding
-(void)mouseDown:(NSEvent *)event
- (void)mouseDragged:(NSEvent *)theEvent for some custom
drawing in child view subclass
To be specific, I draw some rectangle boxes during mouse drag in
child view's.
Problem: when cursor moves out of the child view( during mouse
drag ) , obviously, I am not able to track the event and hence I
cannot resize the rectangle.
I am looking something like autoScroll for NSScrollView , which
tracks the mouse movements even outside the application window...
Is there any obvious or complex way to achieve this.....
Thanks in Advance
Rajesh
_______________________________________________
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
Begin forwarded message:
From: Graham Cox <email@hidden>
Date: April 17, 2009 4:05:26 PM GMT+02:00
To: rajesh <email@hidden>
Cc: cocoa-dev Dev <email@hidden>
Subject: Re: How to: continue tracking mouse-drag event even after
cursor moves out of the movie....
On 18/04/2009, at 12:02 AM, rajesh wrote:
I am looking something like autoScroll for NSScrollView , which
tracks the mouse movements even outside the application window...
Is there any obvious or complex way to achieve this.....
Use NSScrollView? It doesn't have to have visible scrollbars.
--Graham
_______________________________________________
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