NSOutlineView drag indicator indentation
NSOutlineView drag indicator indentation
- Subject: NSOutlineView drag indicator indentation
- From: Jan Van Tol <email@hidden>
- Date: Fri, 26 Dec 2003 00:07:59 -0600
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.