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 22:26:32 +0100
Right, unfortunately methods drawing the indicator are private to
NSTableView (NSOutlineView inherits from NSTableView)
- (void)_drawDropHighlightOnRow:(int)fp8;
- (void)_drawDropHighlightBetweenUpperRow:(int)fp8
andLowerRow:(int)fp12 atOffset:(float)fp16;
You can still overwrite them at your own risks.
Pascal Pochet
P3 Consulting
On 26 dic. 2003, at 21:26, Jan Van Tol wrote:
Unfortunately that only affects the drag image. What I'm concerned
about is the indicator that appears in the outline view showing where
the item will go when you drop it.
-Jan Van Tol
On Dec 26, 2003, at 2:52 AM, p3consulting wrote:
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.
_______________________________________________
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.