title: Disclosure button displaying a menu
body: <p>Please give me an advice how to implement this kind of disclosure button as on my screenshot - a disclosure "arrow down" button displaying a menu on click:</p>
  
  <p><img src="https://i.stack.imgur.com/T1bA7.png" alt="What do I want"></p>
  
  <p>I've tried two approaches, using <code>NSPopupButton</code> and <code>NSButton</code> with disclosure style and manual menu displaying:</p>
  
  <ul>
  <li><p><code>NSPopupButton</code> keeps displaying default value text and can't be resized in Interface Builder to a narrow size.</p>
  
  <p><img src="https://i.stack.imgur.com/3LOtX.png" alt="NSPopupButton"></p></li>
  <li><p><code>NSButton</code> displays a menu, but it's obviously misplaced to the point where I click the button, not at the bottom edge. I'm using the following code:</p>
  
  <pre><code>- (IBAction)handleShowMenu:(id)sender
  {
      [NSMenu popUpContextMenu:profileMenu
                     withEvent:[NSApp currentEvent]
                       forView:sender];
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/u59MD.png" alt="NSButton with menu"></p></li>
  </ul>
  
  <p>So what's the right way to display such a menu?</p>