Dragging in Outlineview

Discussion in 'Mac Programming' started by i.yalovecky, Jul 27, 2010.

  1. i.yalovecky macrumors member

    Feb 24, 2010
    How i can implement dragging highlighting (blue line) in case then i drag top level item that can be dropped only at the top level.

    Example is Mail. When i dragging MAILBOXES it highlights where it will appeared very good for me.
  2. i.yalovecky thread starter macrumors member

    Feb 24, 2010
    This function setDropItem:dropChildIndex: helped me.
  3. GorillaPaws macrumors 6502a


    Oct 26, 2003
    Richmond, VA
    As you've discovered, use the delegate methods. The tricky part about drag/dropping using an NSOutlineView is figuring out the indexing, because the index is used in relation to the parent node, not to the global list. If you're trying to maintain sort order it can be a bit messy.

Share This Page