Re: disable black boxes in NSTableView during d'n'd
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