Re: NSOutlineView drag indicator indentation
Re: NSOutlineView drag indicator indentation
- Subject: Re: NSOutlineView drag indicator indentation
- From: p3consulting <email@hidden>
- Date: Fri, 26 Dec 2003 09:52:39 +0100
See
http://www.macosxguru.net/article.php?story=20031220230948317
it is for NSTableView but the same principle should apply to
NSOutlineView
since
- (void)dragImage:(NSImage *)anImage at:(NSPoint)imageLoc
offset:(NSSize)mouseOffset event:(NSEvent *)theEvent
pasteboard:(NSPasteboard *)pboard source:(id)sourceObject
slideBack:(BOOL)slideBack
is a NSView method.
Pascal Pochet
P3 Consulting
On 26 dic. 2003, at 07:07, Jan Van Tol wrote:
>
List,
>
>
I'm trying to create an outline view that can act like either a normal
>
outline, with disclosure triangles, or as a table view. Basically, you
>
can flip a preference, and it groups the items that were in the table
>
view-like outline under various groups with disclosure triangles. So,
>
not wanting to waste the space normally taken up by the disclosure
>
triangles, I reduce the indentation level when it's in the un-grouped
>
mode, and reinstate the indentation when grouped. The code basically
>
is this:
>
>
if ([[notification object] isEqualToString:@"YES"]) {
>
[outlineView setIndentationPerLevel:12];
>
} else {
>
[outlineView setIndentationPerLevel:0];
>
}
>
[outlineView reloadData];
>
>
Now, this all works great, except for drag and drop. When I drag
>
something in the un-grouped mode, the drag location indicator (the
>
line with round thingy on one end) is indented, as if the disclosure
>
triangle were still there, so it looks like the drag will go inside
>
the item, instead of below it. But in the grouped mode, it works
>
great.
>
>
Does anyone have any ideas on how to counter this? It appears that
>
NSOutlineView is not respecting the setIndentationPerLevel setting for
>
drag and drop, or else I'm missing something.
>
>
Thanks!
>
>
-Jan Van Tol
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.