• 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: NSOutlineView drag indicator indentation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >NSOutlineView drag indicator indentation (From: Jan Van Tol <email@hidden>)
 >Re: NSOutlineView drag indicator indentation (From: p3consulting <email@hidden>)
 >Re: NSOutlineView drag indicator indentation (From: Jan Van Tol <email@hidden>)

  • Prev by Date: IB & Mail.app, Looking for a slider!
  • Next by Date: Inserting pop up buttons within nstextviews.
  • Previous by thread: Re: NSOutlineView drag indicator indentation
  • Next by thread: Using instance of Protocols across application layer files
  • Index(es):
    • Date
    • Thread