• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTableView drag and drop Border
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: NSTableView drag and drop Border
      • From: Corbin Dunn <email@hidden>
References: 
 >NSTableView drag and drop Border (From: Julian <email@hidden>)

  • Prev by Date: Re: Aborting NSOutlineView field editor
  • Next by Date: Re: Thread safety of Cocoa Bindings
  • Previous by thread: NSTableView drag and drop Border
  • Next by thread: Re: NSTableView drag and drop Border
  • Index(es):
    • Date
    • Thread