title: Draw an NSOutlineView background that tracks the last row
body: <p>I am building an outliner in which users make notes. The NSOutlineView is in a NSScrollView which is the full height of the window. I would like to have a plain background behind the NSOutlineView that <em>exactly</em> tracks some margin below the bottom row in the outliner.</p>
  
  <p>The scrollView has elasticity at the ends of its scrolling behaviour. The NSOutlineView animates when in expands/collapses. Users can add new rows, and typing in a row can increase the row height. This gives many variations of movement to the rows.</p>
  
  <p>At the moment I am able to catch some changes in the position of the last row. I override and catch layout() on the NSOutlineView and catch boundsChangedNotifications on the scrollView contentView.</p>
  
  <p>The problem is that layout() is only called on the outlineView at the beginning and end of animation sequences. If I animate changes to the background it almost tracks the same movement, but the animation breaks tracking of any scrollview motion.</p>
  
  <p>I really need to catch updates each frame (as in render) and set the background height. How can I do this? Is there a far more simple way that I am missing?</p>
  
  <p>I don't want to add fake rows to the outline view to to this, as it would make other functionality such as drag and drop very complex.</p>
  
  <p>I am not using Interface Builder.</p>