• 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
NSPopupButton in NSTableView header?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPopupButton in NSTableView header?


  • Subject: NSPopupButton in NSTableView header?
  • From: Randall Meadows <email@hidden>
  • Date: Wed, 11 Feb 2009 13:40:34 -0700

Is it possible to put a custom view, in this case an NSPopupButton, in a specific column header of an NSTableView?

I have a table with 3 columns, one of which displays a status for one of several user-selectable "things" that correspond to the rest of the data in that row. I currently have the popup button that selects which "thing's" status is displayed elsewhere in the window, and it's a little confusing, apparently. I thought if I could put that popup button directly in the header of that column instead, it'd be crystal clear.

Is it a matter of subclassing NSTableHeaderView, overriding - drawRect:, calling super's -drawRect: first, and then placing an NSPopupButton at the appropriate location (as determined by - headerRectOfColumn: for my special column?

That seems like a hack, but it's all I could come up with so far. There doesn't seem to be a way to set a specific cell in the header view.
_______________________________________________


Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSPopupButton in NSTableView header?
      • From: Randall Meadows <email@hidden>
  • Prev by Date: Re: Core Data: right way to gather all elements of a to-many relationship?
  • Next by Date: Re: Transparent Image
  • Previous by thread: Re: Core Data: right way to gather all elements of a to-many relationship?
  • Next by thread: Re: NSPopupButton in NSTableView header?
  • Index(es):
    • Date
    • Thread