Re: NSTableView drag and drop Border
Re: NSTableView drag and drop Border
- Subject: Re: NSTableView drag and drop Border
- From: "I. Savant" <email@hidden>
- Date: Tue, 6 Dec 2005 15:07:38 -0500
Hello, Julian:
There is a wiki page on this very subject:
http://www.cocoadev.com/index.pl?
UglyBlackHighlightRectWhenDraggingToNSTableView
Unfortunately, this is 'hackish' and overrides a non-public method
and could break. You should not use this in shipping applications as
it may very well break your app the next time your user applies
system updates.
--
I.S.
On Dec 6, 2005, at 2:23 PM, Julian wrote:
Hi,
I am looking to achieve a Finder like drag and drop border for my
NSTableView subclass, however so far I have not found any way to
get what I am looking for. So far I have the following in my
NSTableView subclass:
- (void)drawRect:(NSRect)aRect {
[super drawRect:aRect];
NSLog(@"drawRect");
if (isDragging) {
[[NSColor blueColor] set];
NSFrameRect(aRect);
}
}
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender {
NSLog(@"draggingEntered:");
isDragging = YES;
[self setNeedsDisplay:YES];
return NSDragOperationGeneric;
}
- (void)draggingExited:(id <NSDraggingInfo>)sender {
NSLog(@"draggingExited:");
isDragging = NO;
[self setNeedsDisplay:YES];
}
This does draw the Blue frame, however the Black frame is also
drawn underneath the blue. Any ideas??
~Julian
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
_______________________________________________
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