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

Re: NSPopupButton in NSTableView header?


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

And OF COURSE I find the answer not 10 seconds after pressing Send...NSTableColumn -setHeaderCell:.

Silly me, I was looking in NSTableHeaderView.  What was I thinking?! ;)


On Feb 11, 2009, at 1:40 PM, Randall Meadows wrote:

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


References: 
 >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: Saving a PDF Selection or converting it to an NSRange and back
  • Previous by thread: NSPopupButton in NSTableView header?
  • Next by thread: Saving a PDF Selection or converting it to an NSRange and back
  • Index(es):
    • Date
    • Thread