• 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: disable black boxes in NSTableView during d'n'd
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: disable black boxes in NSTableView during d'n'd


  • Subject: Re: disable black boxes in NSTableView during d'n'd
  • From: nick briggs <email@hidden>
  • Date: Mon, 31 Jan 2005 19:09:47 +0000

Thanks jeremy

That helps, the black boxes don't get drawn.

I still have a problem - I now get a black line drawn in between each row...

Even if I set inter-row spacing to 0, I still get a black line drawn at the top of the first row.

Any further ideas?

Regards

Nick



On 31 Jan 2005, at 18:33, Jeremy Dronfield wrote:


On 31 Jan 2005, at 4:44 pm, M. Uli Kusterer wrote:

At 15:15 Uhr +0000 31.01.2005, nick briggs wrote:
I wish to disable the 'back boxes' that get drawn around a NSTableView row during a drag operation.

Do you still want to accept drags, do you still want other kinds of highlighting or just the boxes around the items?


I remember that there's a method (or parameter to a method) concerned with drag and drop delegate stuff on table views (see NSTableView.h for that particular protocol), where you can return the number of the row to drop below as a side effect in one of the parameters. It may be as easy as returning the correct value there.

Not sure it'll be that easy to just turn off or change the drop highlight, though.

It's easy to turn off the "box" highlight (which represents a "drop-on" operation) and force a "drop above" operation instead. The method required is -[NSTableView setDropRow:dropOperation:]. You can do it during drop validation:


- (NSDragOperation)tableView:(NSTableView *)tableView validateDrop:(id <NSDraggingInfo>)info proposedRow:(int)row proposedDropOperation:(NSTableViewDropOperation)operation
{
if (operation == NSTableViewDropOn)
[tableView setDropRow:row dropOperation:NSTableViewDropAbove];

// rest of implementation snipped ...
}


Regards,

-Jeremy

===================================
SkoobySoft, home of viJournal and Skooby Renamer
email: email@hidden or visit:
http://freespace.virgin.net/jeremy.dronfield/skoobysoft.html
===================================


_______________________________________________ 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: disable black boxes in NSTableView during d'n'd
      • From: mmalcolm crawford <email@hidden>
References: 
 >disable black boxes in NSTableView during d'n'd (From: nick briggs <email@hidden>)
 >Re: disable black boxes in NSTableView during d'n'd (From: "M. Uli Kusterer" <email@hidden>)
 >Re: disable black boxes in NSTableView during d'n'd (From: Jeremy Dronfield <email@hidden>)

  • Prev by Date: Re: NSImage thread safety
  • Next by Date: Re: NSImage thread safety
  • Previous by thread: Re: disable black boxes in NSTableView during d'n'd
  • Next by thread: Re: disable black boxes in NSTableView during d'n'd
  • Index(es):
    • Date
    • Thread